summaryrefslogtreecommitdiff
path: root/t/t3200-branch.sh
diff options
context:
space:
mode:
authorLibravatar SZEDER Gábor <szeder.dev@gmail.com>2017-02-03 03:48:27 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-02-03 22:18:41 -0800
commita958d40f4e7dbe02d4c85677c2616f20778b6aa7 (patch)
tree0b6da76e87c29b2453cf3a3a8426bc2c1ca4dc14 /t/t3200-branch.sh
parentcompletion: consolidate silencing errors from git commands (diff)
downloadtgif-a958d40f4e7dbe02d4c85677c2616f20778b6aa7.tar.xz
completion: don't guard git executions with __gitdir()
Three completion functions, namely __git_index_files(), __git_heads() and __git_tags(), first run __gitdir() and check that the path it outputs exists, i.e. that there is a git repository, and run a git command only if there is one. After the previous changes in this series there are no further uses of __gitdir()'s output in these functions besides those checks. And those checks are unnecessary, because we can just execute those git commands outside of a repository and let them error out. We don't perform such a check in other places either. Remove this check and the __gitdir() call from these functions, sparing the fork()+exec() overhead of the command substitution and the potential 'git rev-parse' execution. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3200-branch.sh')
0 files changed, 0 insertions, 0 deletions