From: Omar Polo Subject: Re: regress for got diff -d + minor fix To: Omar Polo Cc: Mark Jamsek , Game of Trees Date: Tue, 10 Jan 2023 10:52:36 +0100 On 2023/01/10 10:47:14 +0100, Omar Polo wrote: > On 2023/01/10 20:15:04 +1100, Mark Jamsek wrote: > > +test_diff_commit_diffstat() { > > + local testroot=`test_init diff_commit_diffstat` > > + local commit_id0=`git_show_head $testroot/repo` > > + alpha_id0=`get_blob_id $testroot/repo "" alpha` > > + beta_id0=`get_blob_id $testroot/repo "" beta` > > alpha_id0, beta_id0 should be `local' ah, it's a copy-paste from test_diff_commits(). anyway, should be local and if you'd like to fix test_diff_commits() too while you're at it, it'd be great :P > > + got checkout $testroot/repo $testroot/wt > /dev/null > > + ret=$? > > + if [ $ret -ne 0 ]; then > > + test_done "$testroot" "$ret" > > + return 1 > > + fi > > + > > + echo "modified alpha" > $testroot/wt/alpha > > + (cd $testroot/wt && got rm beta >/dev/null) > > + echo "new file" > $testroot/wt/new > > + (cd $testroot/wt && got add new >/dev/null) > > + (cd $testroot/wt && got commit -m 'committing changes' >/dev/null) > > + local commit_id1=`git_show_head $testroot/repo` > > + > > + alpha_id1=`get_blob_id $testroot/repo "" alpha` > > + new_id1=`get_blob_id $testroot/repo "" new` > > ditto > > > + cat <$testroot/stdout.expected > > +diffstat $commit_id0 refs/heads/master > > + M alpha | 1+ 1- > > + D beta | 0+ 1- > > + A new | 1+ 0- > > + > > [...]