Skip to content

Commit c870de6

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 73876f4 commit c870de6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/get-tar-commit-id.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix)
3232
die_errno("git get-tar-commit-id: read error");
3333
if (n != HEADERSIZE)
3434
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)
3636
return 1;
3737

3838
len = strtol(content, &end, 10);

0 commit comments

Comments
 (0)