get-tar-commit-id: use TYPEFLAG_GLOBAL_HEADER instead of magic value
Use the same macro in the archive reader code as on the writer side in archive-tar.c to document the connection. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
73876f4861
commit
c870de6502
@ -32,7 +32,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
|
||||
die_errno("git get-tar-commit-id: read error");
|
||||
if (n != HEADERSIZE)
|
||||
die_errno("git get-tar-commit-id: EOF before reading tar header");
|
||||
if (header->typeflag[0] != 'g')
|
||||
if (header->typeflag[0] != TYPEFLAG_GLOBAL_HEADER)
|
||||
return 1;
|
||||
|
||||
len = strtol(content, &end, 10);
|
||||
|
Loading…
Reference in New Issue
Block a user