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>

René Scharfe committed Apr 8, 2023 at 12:25 UTC c870de65024e8ee4ca1637f4765d2d61ecb51152
1 file changed +1 -1
builtin/get-tar-commit-id.c
+1 -1
index 491af9202d..453a411f3c 100644 --- a/builtin/get-tar-commit-id.c +++ b/builtin/get-tar-commit-id.c @@ -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);