Browse Source

Merge branch 'rs/get-tar-commit-id-use-defined-const'

Code clean-up to replace a hardcoded constant with a CPP macro.

* rs/get-tar-commit-id-use-defined-const:
  get-tar-commit-id: use TYPEFLAG_GLOBAL_HEADER instead of magic value
main
Junio C Hamano 2 years ago
parent
commit
08bd076ce4
  1. 2
      builtin/get-tar-commit-id.c

2
builtin/get-tar-commit-id.c

@ -35,7 +35,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv UNUSED, const char *prefix @@ -35,7 +35,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv UNUSED, 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…
Cancel
Save