Skip to content

Commit 1373999

Browse files
committed
Merge branch 'ds/push-squelch-ambig-warning'
"git push" used to check ambiguities between object-names and refnames while processing the list of refs' old and new values, which was unnecessary (as it knew that it is feeding raw object names). This has been optimized out. * ds/push-squelch-ambig-warning: pack-objects: ignore ambiguous object warnings
2 parents 9549326 + a4544b3 commit 1373999

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

builtin/pack-objects.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3084,6 +3084,7 @@ static void get_object_list(int ac, const char **av)
30843084
struct rev_info revs;
30853085
char line[1000];
30863086
int flags = 0;
3087+
int save_warning;
30873088

30883089
repo_init_revisions(the_repository, &revs, NULL);
30893090
save_commit_buffer = 0;
@@ -3093,6 +3094,9 @@ static void get_object_list(int ac, const char **av)
30933094
/* make sure shallows are read */
30943095
is_repository_shallow(the_repository);
30953096

3097+
save_warning = warn_on_object_refname_ambiguity;
3098+
warn_on_object_refname_ambiguity = 0;
3099+
30963100
while (fgets(line, sizeof(line), stdin) != NULL) {
30973101
int len = strlen(line);
30983102
if (len && line[len - 1] == '\n')
@@ -3119,6 +3123,8 @@ static void get_object_list(int ac, const char **av)
31193123
die(_("bad revision '%s'"), line);
31203124
}
31213125

3126+
warn_on_object_refname_ambiguity = save_warning;
3127+
31223128
if (use_bitmap_index && !get_object_list_from_bitmap(&revs))
31233129
return;
31243130

0 commit comments

Comments
 (0)