From: Junio C Hamano <gitster@pobox•com>
To: Richard Hansen <rhansen@bbn•com>
Cc: "Julien Carsique" <julien.carsique@gmail•com>,
git@vger•kernel.org, "SZEDER Gábor" <szeder@ira•uka.de>,
"Felipe Contreras" <felipe.contreras@gmail•com>,
"Ramkumar Ramachandra" <artagnon@gmail•com>,
"Simon Oosthoek" <s.oosthoek@xs4all•nl>,
"Eduardo R. D'Avila" <erdavila@gmail•com>
Subject: Re: [PATCH] git-prompt.sh: shorter equal upstream branch name
Date: Tue, 30 Sep 2014 15:35:26 -0700 [thread overview]
Message-ID: <xmqq7g0krb2p.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <542B1623.2070109@bbn.com> (Richard Hansen's message of "Tue, 30 Sep 2014 16:44:19 -0400")
Richard Hansen <rhansen@bbn•com> writes:
> Additional cases could be added to handle git-svn if needed.
Thanks for a review (everything I omitted above looked good to me).
>> + __git_ps1_upstream_name=${__git_ps1_upstream_name/$__head/=}
>
> * This could break if ${__head} contains any pattern-special
> characters.
... but I do not think refnames can have *, ? and such so it may not
be relevant ;-).
> * While this syntax works in both Bash and Zsh (assuming no
> pattern-special characters), my preference is to stick to POSIX[1]
> when possible.
Nah. The existing script is full of bash-isms like local you
suggested to add (and other constructs like shell arrays and [[ ]]
tests, I suspect), and there is no hope to "fix" them to stick to
the bare-minimum POSIX, and there is no need to do so (isn't this
bash-prompt script after all?)
> * I don't think the CodingGuidelines explicitly prohibit long lines
> for shell code, and this file already contains plenty of long
> lines, but I really dislike lines longer than 80 characters.
Yes, I dislike overlong lines, too. But I also dislike lines that
are artificially chopped into
shorter pieces without
good reason ;-).
next prev parent reply other threads:[~2014-09-30 22:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 15:36 [PATCH] git-prompt.sh: shorter equal upstream branch name Julien Carsique
2014-09-30 20:44 ` Richard Hansen
2014-09-30 22:35 ` Junio C Hamano [this message]
2014-10-01 3:54 ` Richard Hansen
2014-10-01 17:49 ` Junio C Hamano
2014-10-07 15:57 ` Julien Carsique
2014-10-07 19:42 ` Richard Hansen
2014-10-07 20:10 ` Junio C Hamano
2014-09-30 22:29 ` 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=xmqq7g0krb2p.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=artagnon@gmail$(echo .)com \
--cc=erdavila@gmail$(echo .)com \
--cc=felipe.contreras@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=julien.carsique@gmail$(echo .)com \
--cc=rhansen@bbn$(echo .)com \
--cc=s.oosthoek@xs4all$(echo .)nl \
--cc=szeder@ira$(echo .)uka.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox