git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: "git branch --contains <commit> <name>" does nothing, silently fails
@ 2017-03-10 10:43 Ævar Arnfjörð Bjarmason
  2017-03-10 12:42 ` Jeff King
  0 siblings, 1 reply; 11+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2017-03-10 10:43 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Ran into this when preparing my --no-contains series, this is a long
standing bug:

    $ ./git branch -D test; ./git branch --contains v2.8.0 test; echo
$?; git rev-parse test
    error: branch 'test' not found.
    0
    test
    fatal: ambiguous argument 'test': unknown revision or path not in
the working tree.

I.e. this should return an error like "git tag" does:

    $ ./git tag -d test; ./git tag --contains v2.8.0 test; echo $?;
git rev-parse test
    error: tag 'test' not found.
    fatal: --contains option is only allowed with -l.
    128
    test
    fatal: ambiguous argument 'test': unknown revision or path not in
the working tree.

I briefly looked through builtin/branch.c, couldn't find a trivial way
to patch it, unfamiliar with the code, didn't want to forget about it,
hence this E-Mail.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-03-12 11:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-10 10:43 BUG: "git branch --contains <commit> <name>" does nothing, silently fails Ævar Arnfjörð Bjarmason
2017-03-10 12:42 ` Jeff King
2017-03-10 13:23   ` Ævar Arnfjörð Bjarmason
2017-03-11 12:08   ` [PATCH] tag: Implicitly supply --list given another list-like option Ævar Arnfjörð Bjarmason
2017-03-11 12:14     ` Ævar Arnfjörð Bjarmason
2017-03-12  2:51       ` Junio C Hamano
2017-03-12  3:00         ` Junio C Hamano
2017-03-12  9:15         ` Ævar Arnfjörð Bjarmason
2017-03-12  3:19     ` Junio C Hamano
2017-03-12  9:15       ` Ævar Arnfjörð Bjarmason
2017-03-12 11:19     ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).