aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorshejialuo <shejialuo@gmail.com>2025-02-28 00:05:55 +0800
committerJunio C Hamano <gitster@pobox.com>2025-02-27 14:03:07 -0800
commit320f2061b63b0157ea8b21362ed12e4ce90258e2 (patch)
tree129648ffbf28577adc6851c77b3a599e869d7a01 /builtin/commit-graph.c
parentMerge branch 'master' of https://github.com/j6t/gitk (diff)
downloadgit-320f2061b63b0157ea8b21362ed12e4ce90258e2.tar.gz
git-320f2061b63b0157ea8b21362ed12e4ce90258e2.zip
t0602: use subshell to ensure working directory unchanged
For every test, we would execute the command "cd repo" in the first but we never execute the command "cd .." to restore the working directory. However, it's either not a good idea use above way. Because if any test fails between "cd repo" and "cd ..", the "cd .." will never be reached. And we cannot correctly restore the working directory. Let's use subshell to ensure that the current working directory could be restored to the correct path. Mentored-by: Patrick Steinhardt <ps@pks.im> Mentored-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: shejialuo <shejialuo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions