Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-08-18 23:04:18 +0300
committerJunio C Hamano <gitster@pobox.com>2019-08-20 01:04:58 +0300
commitdd336a55113a62789f039e382387d0407abaf922 (patch)
tree47e1dd2bcdd77d822737c7ee57ec11e785b4b3ba /builtin
parent894c0f66bb21189d0677be6ecb9923b6acfbf437 (diff)
builtin/repack: write object IDs of the proper length
Use the_hash_algo when calling xwrite with a hex object ID so that the proper amount of data is written. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/repack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 632c0c0a79..5830f796e0 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -190,7 +190,7 @@ static int write_oid(const struct object_id *oid, struct packed_git *pack,
die(_("could not start pack-objects to repack promisor objects"));
}
- xwrite(cmd->in, oid_to_hex(oid), GIT_SHA1_HEXSZ);
+ xwrite(cmd->in, oid_to_hex(oid), the_hash_algo->hexsz);
xwrite(cmd->in, "\n", 1);
return 0;
}