completion: fix most spots not respecting 'git --git-dir=<path>'
authorSZEDER Gábor <szeder.dev@gmail.com>
Fri, 3 Feb 2017 02:48:16 +0000 (03:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 4 Feb 2017 06:18:40 +0000 (22:18 -0800)
The completion script already respects the path to the repository
specified on the command line most of the time, here we add the
necessary '--git-dir=$(__gitdir)' options to most of the places where
git was executed without it. The exceptions where said option is not
added are the git invocations:

- in __git_refs() which are non-trivial and will be the subject of
the following patch,

- getting the list of git commands, merge strategies and archive
formats, because these are independent from the repository and
thus don't need it, and

- the 'git rev-parse --git-dir' in __gitdir() itself.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found