diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-03-25 11:07:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-25 11:07:36 -0700 |
commit | d4c6e9fb6f0db328a40905a3555f8f41d37aaec5 (patch) | |
tree | a2a2df7ccf5d3bcb7f8c170756b2541a1307a52c /revision.c | |
parent | ec8cd4fc111266e005d1a1bc3d4b388564105ce2 (diff) | |
parent | 4c30d50402c17d2569151820b92cea110ad1d240 (diff) | |
download | git-d4c6e9fb6f0db328a40905a3555f8f41d37aaec5.tar.gz |
Merge branch 'jk/warn-on-object-refname-ambiguity'
* jk/warn-on-object-refname-ambiguity:
rev-list: disable object/refname ambiguity check with --stdin
cat-file: restore warn_on_object_refname_ambiguity flag
cat-file: fix a minor memory leak in batch_objects
cat-file: refactor error handling of batch_objects
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/revision.c b/revision.c index 78b5c3ac0b..85085501f6 100644 --- a/revision.c +++ b/revision.c @@ -1575,6 +1575,10 @@ static void read_revisions_from_stdin(struct rev_info *revs, { struct strbuf sb; int seen_dashdash = 0; + int save_warning; + + save_warning = warn_on_object_refname_ambiguity; + warn_on_object_refname_ambiguity = 0; strbuf_init(&sb, 1000); while (strbuf_getwholeline(&sb, stdin, '\n') != EOF) { @@ -1596,7 +1600,9 @@ static void read_revisions_from_stdin(struct rev_info *revs, } if (seen_dashdash) read_pathspec_from_stdin(revs, &sb, prune); + strbuf_release(&sb); + warn_on_object_refname_ambiguity = save_warning; } static void add_grep(struct rev_info *revs, const char *ptn, enum grep_pat_token what) |