git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Indenting lines starting with "die" in shell after "||"
@ 2015-07-27  9:20 Christian Couder
  2015-07-27 10:25 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Couder @ 2015-07-27  9:20 UTC (permalink / raw)
  To: git

Hi,

It looks like we are very inconsistent in shell scripts about
indenting lines starting with "die" after a line that ends with "||",
like:

quite long command ||
die "command failed"

For example in git-rebase--interactive.sh, there is often, but not
always, an extra tab before the die.

It looks like there are no rules about that in Documentation/CodingGuidelines.

Also emacs in shell-script mode is reluctant to add a tab in front of
"die" in such a case.

I wonder if we should state a preference for no extra tab in
Documentation/CodingGuidelines.

Thanks,
Christian.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Indenting lines starting with "die" in shell after "||"
  2015-07-27  9:20 Indenting lines starting with "die" in shell after "||" Christian Couder
@ 2015-07-27 10:25 ` Johannes Schindelin
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2015-07-27 10:25 UTC (permalink / raw)
  To: Christian Couder; +Cc: git

Hi Christian,

On 2015-07-27 11:20, Christian Couder wrote:

> It looks like we are very inconsistent in shell scripts about
> indenting lines starting with "die" after a line that ends with "||",
> like:
> 
> quite long command ||
> die "command failed"
> 
> For example in git-rebase--interactive.sh, there is often, but not
> always, an extra tab before the die.

That is most likely my fault: I used to add that extra tab. It appears to me as if the convention in Git (and in my current coding style) is not to add an extra tab.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-27 10:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-27  9:20 Indenting lines starting with "die" in shell after "||" Christian Couder
2015-07-27 10:25 ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).