Re: [wishlist] git branch -d -r remotename

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Sam Vilain <sam@...>
Cc: <git@...>
Date: Monday, March 19, 2007 - 2:40 am

Junio C Hamano <junkio@cox.net> writes:


Well, I was silly.  If you want to see if A is an ancestor of
any of B C D..., the standard and most efficient way to do so is
with rev-list.

	git rev-list A --not B C D...

will show _nothing_ only when A is an ancestor of one (or more)
of B C D..., so you invoke it and upon getting the first line of
output you declare A cannot be removed without reading the
remainder of the output.

show-branch --independent is an overkill for your purpose as it
does not treat A any more special from others (iow, it checks if
B is contained in A C D..., C is contained in A B D... all in
parallel), and you are not interested in finding out how remote
refs are related with each other.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [wishlist] git branch -d -r remotename, Junio C Hamano, (Mon Mar 19, 2:18 am)
Re: [wishlist] git branch -d -r remotename, Junio C Hamano, (Mon Mar 19, 2:40 am)
[No subject], Sam Vilain, (Mon Mar 19, 7:37 pm)