Re: Howto get the merge-base ?
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 14, 2006, 17:44 UTC
- Message-ID
- <7v3bfc33hm.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <4fb292fa0605141021r20cefaa0he592b9c713ede333@mail.gmail.com>
"Bertrand Jacquin" <beber.mailing@gmail.com> writes:
Show 19 quoted lines
> I'm trying to know which commit it the parent of a merge. > For exemple if I do that : > > o Merge > / \ > / \ > | | > | o Commit D > | | > | o Commit C > | | > o | Commit B > \ / > \/ > o Commit A > | > o Init > > How could I know that ``Commit A'' is the merge-base of ``Merge'' ?
> I try to get this git-merge-base but result is strange and quiet > mysterious as he return me always second args I passed to.
It is mysterious to me because you did not say what you gave as arguments ;-).
If I am reading you correctly, you already have a "Merge" commit, made by you or somebody else, and are trying to figure out where the merge base was. If that is the case:
git-merge-base Merge^1 Merge^2
in other words
git-merge-base CommitB CommitD
is what you are looking for?
But what do you need that information for? To reproduce somebody else's merge?