On Thursday 31 January 2013 01:46:11 Jeff King wrote:
> Currently, a branch filter like `--contains`, `--merged`, or
> `--no-merged` is ignored when we are not in listing mode.
> For example:
>   git branch --contains=foo bar
> will create the branch "bar" from the current HEAD, ignoring
> the `--contains` argument entirely. This is not very
> helpful. There are two reasonable behaviors for git here:
>   1. Flag an error; the arguments do not make sense.
>   2. Implicitly go into `--list` mode
> This patch chooses the latter, as it is more convenient, and
> there should not be any ambiguity with attempting to create
> a branch; using `--contains` and not wanting to list is
> nonsensical.
> That leaves the case where an explicit modification option
> like `-d` is given.  We already catch the case where
> `--list` is given alongside `-d` and flag an error. With
> this patch, we will also catch the use of `--contains` and
> other filter options alongside `-d`.
> Signed-off-by: Jeff King <p...@peff.net>
Tested-by: Peter Wu <lekenst...@gmail.com>

I have tested this patch on top of and it seems to work.

One note, the following command spits out master without complaining about the 
non-existing branch name:

    git branch --contains <id> master <non-existant branch name>

(the order of branches doesn't affect the result.)

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to