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:
Diffstat (limited to 'archive-tar.c')
-rw-r--r--archive-tar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/archive-tar.c b/archive-tar.c
index e7153c69e7..e16d3f756d 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -332,14 +332,15 @@ static int write_tar_entry(struct archiver_args *args,
static void write_global_extended_header(struct archiver_args *args)
{
- const unsigned char *sha1 = args->commit_sha1;
+ const struct object_id *oid = args->commit_oid;
struct strbuf ext_header = STRBUF_INIT;
struct ustar_header header;
unsigned int mode;
- if (sha1)
+ if (oid)
strbuf_append_ext_header(&ext_header, "comment",
- sha1_to_hex(sha1), 40);
+ oid_to_hex(oid),
+ the_hash_algo->hexsz);
if (args->time > USTAR_MAX_MTIME) {
strbuf_append_ext_header_uint(&ext_header, "mtime",
args->time);