[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [PATCH] git-prompt.sh: shorter equal upstream branch name
From: Junio C Hamano <gitster () pobox ! com>
Date: 2014-09-30 22:35:26
Message-ID: xmqq7g0krb2p.fsf () gitster ! dls ! corp ! google ! com
[Download RAW message or body]
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 ;-).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic