]> git.ipfire.org Git - thirdparty/git.git/commit - t/t5318-commit-graph.sh
t5318: avoid top-level directory changes
authorTaylor Blau <me@ttaylorr.com>
Mon, 24 Jul 2023 16:39:28 +0000 (12:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Jul 2023 21:35:22 +0000 (14:35 -0700)
commit51550d03e438bfcb83bec7665baec2378f931a80
tree570a957b035b2b866cacb2ff63652cfc1252b366
parenta953d2b628952f8d225d337deb1c30e20f835689
t5318: avoid top-level directory changes

Avoid changing the current working directory from outside of a sub-shell
during the tests in t5318.

Each test has mostly straightforward changes, either:

  - Removing the top-level `cd "$TRASH_DIRECTORY/full"`, which is
    unnecessary after ensuring that other tests don't change their
    working directory outside of a sub-shell.

  - Changing any Git invocations which want to be in a sub-directory by
    either (a) adding a "-C $DIR" argument, or (b) moving the whole test
    into a sub-shell.

While we're here, remove any explicit "git config core.commitGraph true"
invocations which were designed to enable use of the commit-graph. These
are unnecessary following 31b1de6a09b (commit-graph: turn on
commit-graph by default, 2019-08-13).

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5318-commit-graph.sh