submodule: avoid hard-coded constants
Instead of using hard-coded 40-based constants, express these values in terms of the_hash_algo and GIT_MAX_HEXSZ. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3c7714485d
commit
db1ba2a230
@ -1122,7 +1122,7 @@ static int find_first_merges(struct repository *repo,
|
||||
struct commit *commit;
|
||||
int contains_another;
|
||||
|
||||
char merged_revision[42];
|
||||
char merged_revision[GIT_MAX_HEXSZ + 2];
|
||||
const char *rev_args[] = { "rev-list", "--merges", "--ancestry-path",
|
||||
"--all", merged_revision, NULL };
|
||||
struct rev_info revs;
|
||||
|
Reference in New Issue
Block a user