Re: [PATCH v6] submodule: add 'deinit' command
- From
Heiko Voigt <hvoigt@hvoigt.net>
- Date
- Mar 6, 2013, 06:52 UTC
- Message-ID
- <20130306065246.GB4064@sandbox-ub>
- In-Reply-To
- <7vppzdvoj1.fsf@alter.siamese.dyndns.org>
On Tue, Mar 05, 2013 at 07:45:22AM -0800, Junio C Hamano wrote:
Show 15 quoted lines
> Heiko Voigt <hvoigt@hvoigt.net> writes: > > >> + if test -z "$force" > >> + then > >> + git rm -n "$sm_path" || > >> + die "$(eval_gettext "Submodule work tree '\$sm_path' contains local modifications; use '-f' to discard them")" > > > > Minor nit. IMO, there is an indentation for the || missing here. Maybe > > Junio can squash that in on his side? > > Sorry, but I do not see an indentation nit here. The format looks > perfectly sane to me and in fact any other indentation would be > wrong. > > Puzzled...
Wouldn't you write this code snippet like this to make clear that there is another conditional?
if test -z "$force" then git rm -n "$sm_path" || die "$(eval_gettext "Submodule work tree '\$sm_path' contains local modifications; use '-f' to discard them")"
It seems it is not clear in the code base either. Some places do some do not indent:
git grep -A 1 '||' *.sh
Except for the testsuite I just assumed that this style was common, because for me it makes the code much easier to read.
It seems it is not, so forget my comment.
Cheers Heiko