Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/3] completion: Change "if [...]" to "if test ..." to match git convention

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:09

Ted Pavlic [off-list ref] writes:
quoted
NAK.

This script only runs in bash.  bash supports [...].  The
prevailing convention in the script is to use [...].  Only
4 tests inside of __git_ps1 use "test", the rest of the code
is using [...].
So this trumps Documentation/CodingGuidelines, which says:

 - We prefer "test" over "[ ... ]".

?
No, this paragraph from Documentation/CodingGuidelines trumps you.

    As for more concrete guidelines, just imitate the existing code
    (this is a good guideline, no matter which project you are
    contributing to). It is always preferable to match the _local_
    convention. New code added to git suite is expected to match
    the overall style of existing code. Modifications to existing
    code is expected to match the style the surrounding code already
    uses (even if it doesn't match the overall style of existing code).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help