aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-submodule.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-01-15 11:36:06 +0100
committerJunio C Hamano <gitster@pobox.com>2024-01-16 09:18:21 -0800
commit7b9cda2d3d7de794974ce6f29a2a838565cd338d (patch)
tree8d9a843938899b9551683af4ad2bb7d1fa1e2e10 /t/helper/test-submodule.c
parentt9902: verify that completion does not print anything (diff)
downloadgit-7b9cda2d3d7de794974ce6f29a2a838565cd338d.tar.gz
git-7b9cda2d3d7de794974ce6f29a2a838565cd338d.zip
completion: improve existence check for pseudo-refs
Improve the existence check along the following lines: - Stop stripping the "ref :" prefix and compare to the expected value directly. This allows us to drop a now-unused variable that was previously leaking into the user's shell. - Mark the "head" variable as local so that we don't leak its value into the user's shell. - Stop manually handling the `-C $__git_repo_path` option, which the `__git ()` wrapper aleady does for us. - In simlar spirit, stop redirecting stderr, which is also handled by the wrapper already. Suggested-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-submodule.c')
0 files changed, 0 insertions, 0 deletions