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
@@ -32,7 +32,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
32 die_errno("git get-tar-commit-id: read error");
33 if (n != HEADERSIZE)
34 die_errno("git get-tar-commit-id: EOF before reading tar header");
35 - if (header->typeflag[0] != 'g')
35 + if (header->typeflag[0] != TYPEFLAG_GLOBAL_HEADER)
36 return 1;
37
38 len = strtol(content, &end, 10);