summaryrefslogtreecommitdiff
path: root/t/helper/test-revision-walking.c
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2020-06-22 18:04:18 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-06-22 11:21:07 -0700
commit6e9c4d408dfa842b22d612b7a6f1242bba2a5479 (patch)
treef84c0fdd881b3b777dbc6e72c770fdd34d9b7ba4 /t/helper/test-revision-walking.c
parentgit-cvsimport: port to SHA-256 (diff)
downloadtgif-6e9c4d408dfa842b22d612b7a6f1242bba2a5479.tar.xz
git-cvsexportcommit: port to SHA-256
When we apply a binary patch, we must have the full object ID in the header in order to apply it; without that, any attempt to apply it will fail. If we set GIT_DIR to empty, git apply does not know about the hash algorithm we're using, and consequently any attempt to apply a patch using SHA-256 will fail, since the object ID is the wrong length. The reason we set the GIT_DIR environment variable is because we don't want to modify the index; we just want to know whether the patch applies. Instead, let's just use a temporary file for the index, which will be cleaned up automatically when the object goes out of scope. Additionally, read the configuration for the repository and compute the length of an object ID based on it. Use that when matching object IDs with a regex or computing the all-zeros object ID. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Acked-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-revision-walking.c')
0 files changed, 0 insertions, 0 deletions