Hi,
here is a big mixed bag of bugfixes, cleanups and optimizations mostly
related to how we find out the path to the repository and how we use
that path.
Noteworthier changes are the following:
- Patch 18 shuts up error messages from git commands. This is the
one I mentioned some days ago[1].
- Patches 13-16 make 'git -C <path> <cmd> <TAB>' work as it should,
with the help of a new 'git rev-parse' option.
- Patches 17, 19-21 get rid of a few fork()s and exec()s.
Funfact: I submitted initial versions of patches 20-21 already in
2012 ;) [2]
Tests pass with all 3.x and 4.x Bash versions[3].
This series is also available from:
https://github.com/szeder/git completion-gitdir-improvements
Best,
Gábor
[1] - http://thread.gmane.org/gmane.comp.version-control.git/286074/focus=286078
[2] - http://thread.gmane.org/gmane.comp.version-control.git/197432/focus=197438
[3] - In case somebody feels interested, a little proof of concept
(with Travis CI integration!):
https://github.com/szeder/git completion-test-multiple-bash-versions
SZEDER Gábor (21):
completion: improve __git_refs()'s in-code documentation
completion tests: don't add test cruft to the test repository
completion tests: make the $cur variable local to the test helper
functions
completion tests: consolidate getting path of current working
directory
completion tests: check __gitdir()'s output in the error cases
completion tests: add tests for the __git_refs() helper function
completion: ensure that the repository path given on the command line
exists
completion: fix most spots not respecting 'git --git-dir=<path>'
completion: respect 'git --git-dir=<path>' when listing remote refs
completion: list refs from remote when remote's name matches a
directory
completion: don't list 'HEAD' when trying refs completion outside of a
repo
completion: list short refs from a remote given as a URL
rev-parse: add '--absolute-git-dir' option
completion: don't offer commands when 'git --opt' needs an argument
completion: fix completion after 'git -C <path>'
completion: respect 'git -C <path>'
completion: don't use __gitdir() for git commands
completion: consolidate silencing errors from git commands
completion: don't guard git executions with __gitdir()
completion: extract repository discovery from __gitdir()
completion: cache the path to the repository
Documentation/git-rev-parse.txt | 4 +
builtin/rev-parse.c | 29 +-
contrib/completion/git-completion.bash | 248 ++++++++++-----
t/t1500-rev-parse.sh | 17 +-
t/t9902-completion.sh | 560 ++++++++++++++++++++++++++++-----
5 files changed, 682 insertions(+), 176 deletions(-)
--
2.7.2.410.g92cb358
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html