summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-06-14 06:31:31 -0400
committerJunio C Hamano <gitster@pobox.com>2024-06-14 09:34:38 -0700
commite2269a2b59078d2da0e9450f0785bc547bbba0ed (patch)
tree638dbdd90fc1a86daf8cbdba20cee04f4639e8b6 /diff.c
parent9badf97c42474df3f0474a851bdc2e62e59da403 (diff)
t5801: make remote-testgit GIT_DIR setup more robust
Our tests use a fake helper that just imports from an existing Git repository. We're fed the path to that repo on the command line, and derive the GIT_DIR by tacking on "/.git". This is wrong if the path is a bare repository, but that's OK since this is just a limited test. But it's also wrong if the transport code feeds us the actual .git directory itself (i.e., we expect "/path/to/repo" but it gives us "/path/to/repo/.git"). None of the current tests do that, but let's future-proof ourselves against adding a test that does. We can instead ask "rev-parse" to set our GIT_DIR. Note that we have to first unset other git variables from our environment. Coming into this script, we'll have GIT_DIR set to the fetching repository, and we need to "switch" to the remote one. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions