summaryrefslogtreecommitdiff
path: root/t/helper/test-delta.c
diff options
context:
space:
mode:
authorLibravatar SZEDER Gábor <szeder.dev@gmail.com>2018-05-10 16:01:53 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-05-11 12:32:51 +0900
commitcfb482b6c33508c3a14b721b1e48a881fcbe7146 (patch)
tree0d1e85ab9fdd0b1a47ccdfd09bfba1752b071548 /t/helper/test-delta.c
parentGit 2.17 (diff)
downloadtgif-cfb482b6c33508c3a14b721b1e48a881fcbe7146.tar.xz
t5516-fetch-push: fix 'push with dry-run' test
In a while-at-it cleanup replacing a 'cd dir && <...> && cd ..' with a subshell, commit 28391a80a9 (receive-pack: allow deletion of corrupt refs, 2007-11-29) also moved the assignment of the $old_commit variable to that subshell. This variable, however, is used outside of that subshell as a parameter of check_push_result(), to check that a ref still points to the commit where it is supposed to. With the variable remaining unset outside the subshell check_push_result() doesn't perform that check at all. Use 'git -C <dir> cmd...', so we don't need to change directory, and thus don't need the subshell either when setting $old_commit. Furthermore, change check_push_result() to require at least three parameters (the repo, the oid, and at least one ref), so it will catch similar issues earlier should they ever arise. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-delta.c')
0 files changed, 0 insertions, 0 deletions