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

Re: Find out on which branch a commit was originally made

From
TATor Arntsen <tor@spacetec.no>
Date
Sep 18, 2010, 11:28 UTC
Message-ID
<AANLkTim4cqAhWPTY5tSsFq7S1A_f=9QFy=3Mrp9ZFwXT@mail.gmail.com>
In-Reply-To
<AANLkTiknoBS7x2za3qzghfS0TD6UUL83eoZz7LFBPUuc@mail.gmail.com>

On Sat, Sep 18, 2010 at 11:58, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote: [..]

Show 22 quoted lines
> What Git *does* track however when you do `git merge topic` is the
> name of the `topic` branch you're merging into some other branch,
> e.g. here (from git-merge(1)):
>
>                     A---B---C topic
>                    /         \
>               D---E---F---G---H master
>
> Even though A B and C might have been commited on branches called
> `blah`, `bluh` and `blarghl` you'll never know. You'll just know that
> someone put them all together on a branch called `topic` and that
> someone later merged that into master in the main repository. E.g.:
>
>    Merge: A G
>    Author: Some Guy <some-guy@example.com>
>    Date:   <....>
>
>        Merge branch 'topic'
>
> >From there you can *infer* that A-B-C came from the topic branch,
> because of that merge commit and that the DAG doesn't meet master
> until commit E.
[..]

However, you can see it explictly if you add --log when merging, i.e. git merge --no-ff --log topic (you'll get a list of one-line commit messages from those commits merged into master from topic). It doesn't identify the commits, only the commit messages. Therefore I add problem report IDs into my oneline-messages, and I get a shortlist of exactly what was fixed by a given merge. This is sufficient support for me, I too don't care where a commit _originally_ came from, before it arrived into the branch that I at some point merge to the delivery branch.

-Tor
Previous: Ævar Arnfjörð BjarmasonNext: Stefan Haller
Message 4 of 33 in “Find out on which branch a commit was originally made”
  1. Stefan HallerSep 18, 2010
  2. Ævar Arnfjörð BjarmasonSep 18, 2010
  3. Ævar Arnfjörð BjarmasonSep 18, 2010
  4. Tor ArntsenSep 18, 2010
  5. Stefan HallerSep 18, 2010
  6. Artur SkawinaSep 18, 2010
  7. Stefan HallerSep 19, 2010
  8. Clemens BuchacherSep 19, 2010
  9. Artur SkawinaSep 19, 2010
  10. Stefan HallerSep 19, 2010
  11. Artur SkawinaSep 19, 2010
  12. Robin RosenbergSep 19, 2010
  13. Seth RobertsonSep 19, 2010
  14. Artur SkawinaSep 19, 2010
  15. Seth RobertsonSep 19, 2010
  16. Artur SkawinaSep 20, 2010
  17. Seth RobertsonSep 20, 2010
  18. Stefan HallerSep 20, 2010
  19. Artur SkawinaSep 20, 2010
  20. Artur SkawinaSep 20, 2010
  21. Seth RobertsonSep 21, 2010
  22. Artur SkawinaSep 21, 2010
  23. ANNOUNCE git-what-branch (was Re: Find out on which branch a commit was originally made)Seth Robertson, Sep 22, 2010
  24. Artur SkawinaSep 22, 2010
  25. Seth RobertsonSep 22, 2010
  26. Stephen BashSep 23, 2010
  27. Ævar Arnfjörð BjarmasonSep 23, 2010
  28. Artur SkawinaSep 23, 2010
  29. Artur SkawinaSep 24, 2010
  30. Seth RobertsonSep 24, 2010
  31. Seth RobertsonSep 23, 2010
  32. Stefan HallerSep 20, 2010
  33. Bryan DrewerySep 24, 2010

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.