diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-19 07:24:40 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-19 07:24:40 (GMT) |
commit | 137399934da84ff8258c5ae8522006b5c1674eec (patch) | |
tree | 0cc15771d9f7b1865f20166553e04a0833d11dbd | |
parent | 954932667dac15885165cdb579acbf6a774fe140 (diff) | |
parent | a4544b311eab7c3ffd2aa96deb9be0b92df05ae2 (diff) | |
download | git-137399934da84ff8258c5ae8522006b5c1674eec.zip git-137399934da84ff8258c5ae8522006b5c1674eec.tar.gz git-137399934da84ff8258c5ae8522006b5c1674eec.tar.bz2 |
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
-rw-r--r-- | builtin/pack-objects.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 794714e..d23e812 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -3084,6 +3084,7 @@ static void get_object_list(int ac, const char **av) struct rev_info revs; char line[1000]; int flags = 0; + int save_warning; repo_init_revisions(the_repository, &revs, NULL); save_commit_buffer = 0; @@ -3093,6 +3094,9 @@ static void get_object_list(int ac, const char **av) /* make sure shallows are read */ is_repository_shallow(the_repository); + save_warning = warn_on_object_refname_ambiguity; + warn_on_object_refname_ambiguity = 0; + while (fgets(line, sizeof(line), stdin) != NULL) { int len = strlen(line); if (len && line[len - 1] == '\n') @@ -3119,6 +3123,8 @@ static void get_object_list(int ac, const char **av) die(_("bad revision '%s'"), line); } + warn_on_object_refname_ambiguity = save_warning; + if (use_bitmap_index && !get_object_list_from_bitmap(&revs)) return; |