[PATCH 0/3] completion: Convention updates and DIRTYSTATE fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Three more patches to git's bash completion script.

The first two are non-critical:
* The first patch changes two "git rev-parse" calls to "__gitdir" to
  match the convention used in the rest of the script.
* The second patch changes "[...]" to "test ..." to match git
  convention. In the one case of "[...] || [...]", a "test || test" call
  is used. Alternatively, a "test ... -o ..." call could be used, but
  that might not be as readable.

The third fixes an ugly error in the new GIT_PS1_DIRTYSTATE. In order to
determine whether the branch name needs a "*" following it, the
DIRTYSTATE implementation uses a "git diff." Because "git diff" is
illegal when not in a working tree, this command gives an ugly error
when changing directory to ".git". This patch detects this case and sets
"--work-tree=..". Is there a better fix?

Ted Pavlic (3):
  completion: For consistency, changed "git rev-parse" to __gitdir
    calls.
  completion: Change "if [...]" to "if test ..." to match git
    convention
  completion: Prevents GIT_PS1_DIRTYSTATE from breaking when CWD is
    .git

 contrib/completion/git-completion.bash |  101 +++++++++++++++-----------------
 1 files changed, 48 insertions(+), 53 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux