git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Howto get the merge-base ?

From
BJBertrand Jacquin <beber.mailing@gmail.com>
Date
May 14, 2006, 18:04 UTC
Message-ID
<4fb292fa0605141104j6c73c1eao5a8eeea9ad1b6282@mail.gmail.com>
In-Reply-To
<7v3bfc33hm.fsf@assigned-by-dhcp.cox.net>
On 5/14/06, Junio C Hamano <junkio@cox.net> wrote:
Show 27 quoted lines
> "Bertrand Jacquin" <beber.mailing@gmail.com> writes:
>
> > 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 ;-).

I was using git-merge-base ``merge-ish'' ``comit-ish''. Docs about it is atrocious so was trying many but not the one good. Blam me.

Show 9 quoted lines
> 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
That's ok :)
> is what you are looking for?
Yes ! Thanks :)
> But what do you need that information for?  To reproduce
> somebody else's merge?

No, that's just on the following of git-send-mail-commit.sh thread (or something near). To make a readable merge mail with diffstat and summury.

-- 
Beber
#e.fr@freenode
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “Howto get the merge-base ?”
  1. Bertrand JacquinMay 14, 2006
  2. Junio C HamanoMay 14, 2006
  3. Bertrand JacquinMay 14, 2006
  4. Junio C HamanoMay 14, 2006
  5. Linus TorvaldsMay 14, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.