summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2022-06-20 15:52:09 -0400
committerJunio C Hamano <gitster@pobox.com>2022-06-21 10:35:38 -0700
commit2ffb7d13ee8ac98a45423ab83d0f952569213a19 (patch)
tree567fe0b3a7fef83446f2afd7fbd7cab000d32aa6 /builtin/commit-graph.c
parent5b71c59bc3b9365075e2a175aa7b6f2b0c84ce44 (diff)
t5510: replace 'origin' with URL more carefully
The many test_configured_prune tests in t5510-fetch.sh test many combinations of --prune, --prune-tags, and using 'origin' or an explicit URL. Some machinery was introduced in e1790f9245f (fetch tests: fetch <url> <spec> as well as fetch [<remote>], 2018-02-09) to replace 'origin' with this explicit URL. This URL is a "file:///" URL for the root of the $TRASH_DIRECTORY. However, if the current build tree has an '@' symbol, the replacement using perl fails. It drops the '@' as well as anything else in that directory name. You can observe this locally by cloning git.git into a "victim@03" directory and running the test script. As we are writing in Perl anyway, pass in the shell variables involved to the script as arguments and perform necessary string transformations inside it, instead of assuming that it is sufficient to enclose the $remote_url variable inside a pair of single quotes. Reported-by: Randall Becker <rsbecker@nexbridge.com> Original-patch-by: Derrick Stolee <derrickstolee@github.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions