Re: Determining commit reachability

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: Determining commit reachability

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:30

Artur Skawina [off-list ref] writes:
Given commit C, refs (branches) R, S and T what would be the best way
to test whether 'C' is reachable from any of the heads?
Depends on the definition of "best", but I often find myself typing

    git branch --with C

where C often is somewhere between 'master' and 'ko/master' (the 'master'
branch everybody else has already seen on k.org).  When I have second
thoughts sometime after applying a patch directly on top of 'master', I
need to see if I have built a new topic branch forking from the faulty
commit before rewinding it, as such a topic branch also needs to be
rewound.

Re: Determining commit reachability

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:49:30

Heya,

On Mon, Sep 6, 2010 at 01:47, Junio C Hamano [off-list ref] wrote:
Depends on the definition of "best", but I often find myself typing

   git branch --with C
In case anyone else is wondering, '--with' is a hidden alias for '--contains'.

-- 
Cheers,

Sverre Rabbelier

Re: Determining commit reachability

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:30

On Mon, Sep 6, 2010 at 20:45, Sverre Rabbelier [off-list ref] wrote:
Heya,

On Mon, Sep 6, 2010 at 01:47, Junio C Hamano [off-list ref] wrote:
quoted
Depends on the definition of "best", but I often find myself typing

   git branch --with C
In case anyone else is wondering, '--with' is a hidden alias for '--contains'.
Maybe it should be documented?

Re: Determining commit reachability

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:49:30

Heya,

On Mon, Sep 6, 2010 at 15:53, Ævar Arnfjörð Bjarmason [off-list ref] wrote:
On Mon, Sep 6, 2010 at 20:45, Sverre Rabbelier [off-list ref] wrote:
quoted
In case anyone else is wondering, '--with' is a hidden alias for '--contains'.
Maybe it should be documented?
Junio added it that way back in "git-branch --contains=commit"
v1.5.3.6-879-g694a577 (Nov 7 2007) when the feature was added. Junio,
do you remember why you added "--with" as a hidden alias?

-- 
Cheers,

Sverre Rabbelier
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help