Martin von Zweigbergk writes:
> On Fri, Aug 31, 2012 at 10:25 AM, Junio C Hamano wrote:
> ...
>> I think "merge-base -h" will get this for free thanks to parseopt.
>
> It seems not, or maybe I'm using the wrong terminology; I meant to
> include it in the first part of the below.
>
> usage: git m
On Fri, Aug 31, 2012 at 10:25 AM, Junio C Hamano wrote:
> Martin von Zweigbergk writes:
>
>>> + if (argc != 2)
>>> + die("--is-ancestor takes exactly two commits");
>>
>> I think git merge-base shows the usage message regardless if argc < 2,
>> so this only happens when more t
Martin von Zweigbergk writes:
>> + if (argc != 2)
>> + die("--is-ancestor takes exactly two commits");
>
> I think git merge-base shows the usage message regardless if argc < 2,
> so this only happens when more than two arguments are given.
Yes, but it is a good discipline no
(Resending as plain text, sorry about duplicate, Junio.)
On Thu, Aug 30, 2012 at 4:13 PM, Junio C Hamano wrote:
>
> In many scripted Porcelain commands, we find this idiom:
>
> if test "$(git rev-parse --verify A)" = "$(git merge-base A B)"
> then
> ... A is an ancestor of B ...
>
In many scripted Porcelain commands, we find this idiom:
if test "$(git rev-parse --verify A)" = "$(git merge-base A B)"
then
... A is an ancestor of B ...
fi
But you do not have to compute exact merge-base only to see if A is
an ancestor of B. Give them a more direct way to
5 matches
Mail list logo