Re: [PATCH v4/GSoC/MICRO] revision: forbid combining --graph and --no-walk
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 17, 2015, 23:18 UTC
- Message-ID
- <xmqq4mpjmcvv.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <c6c08cdbbc0060c6d834c86d13a142cde290dc5c.1426039099.git.dongcan.jiang@gmail.com>
Dongcan Jiang <dongcan.jiang@gmail.com> writes:
Show 9 quoted lines
> Because "--graph" is about connected history while --no-walk > is about discrete points, it does not make sense to allow > giving these two options at the same time. [1] > > This change makes a few calls to "show --graph" fail in > t4052, but asking to show one commit with graph is a > nonsensical thing to do. Thus, tests on "show --graph" in > t4052 have been removed. [2,3] Same tests on "show" without > --graph option have already been tested in 4052.
This looks almost perfect.
Show 11 quoted lines
> > diff --git a/t/t4052-stat-output.sh b/t/t4052-stat-output.sh > index b68afef..a989e8f 100755 > --- a/t/t4052-stat-output.sh > +++ b/t/t4052-stat-output.sh > @@ -99,7 +99,7 @@ do > test_cmp "$expect" actual > ' > > - test "$cmd" != diff || continue > + test "$cmd" != diff -a "$cmd" != show || continue
I think we avoid -a and -o used with test (don't we have a write-up on this somewhere?). Write it like this
test "$cmd" != diff &&
test "$cmd" != show || continueor perhaps like this
case "$cmd" in diff|show) continue ;; esac
Other than that I do not see anything objectionable.
Thanks, good job.