All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Oosthoek <s.oosthoek@xs4all.nl>
To: Junio C Hamano <gitster@pobox.com>
Cc: Martin Erik Werner <martinerikwerner@gmail.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	git@vger.kernel.org, trsten@science-computing.de,
	Felipe Contreras <felipe.contreras@gmail.com>
Subject: Re: [PATCH] shell-prompt: clean up nested if-then
Date: Tue, 19 Feb 2013 09:17:17 +0100	[thread overview]
Message-ID: <5123350D.4010802@xs4all.nl> (raw)
In-Reply-To: <7vtxp98bmx.fsf@alter.siamese.dyndns.org>

On 19/02/13 00:07, Junio C Hamano wrote:
> 
> I think you are misreading a suggestion that is somewhat misguided
> (yes "[ <condition> && <another> ]" does not make sense, but that is
> not applicable to "test <conditon> && test <another>"); ignore it.
> 
> It is fine to write "test <condition> && test <another>" and that
> works portably to even pre-posix systems.

(that's like doing "ls file && rm file" )

> 
> But the existing code the patch touches favors [] over test
> consistently; that alone is a good reason to stick with [] in _this_
> script, even though it is against Git's overall shell script style.
> 

I suppose it would be fine if a patch was sent to update the entire
git-prompt.sh code to be more in line with the Git shell script style...

My original gripe was just with doing it in one place while leaving all
the others unchanged. It makes for messy reading and leads to confusion.

Cheers

Simon

  reply	other threads:[~2013-02-19  8:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1361204512.4758.10.camel@mas>
2013-02-18 16:23 ` [PATCH] shell-prompt: clean up nested if-then Martin Erik Werner
2013-02-18 19:10   ` Jonathan Nieder
     [not found]     ` <0c94f24b-f7ee-4699-87a7-6861b927cea4@email.android.com>
2013-02-18 22:56       ` Martin Erik Werner
2013-02-18 22:59         ` [PATCH v2] " martinerikwerner
2013-02-18 23:28           ` Jonathan Nieder
2013-02-18 23:07         ` [PATCH] " Junio C Hamano
2013-02-19  8:17           ` Simon Oosthoek [this message]
2013-02-19 16:28             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5123350D.4010802@xs4all.nl \
    --to=s.oosthoek@xs4all.nl \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=martinerikwerner@gmail.com \
    --cc=trsten@science-computing.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.