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

Re: Re: Find out on which branch a commit was originally made) (was ANNOUNCE git-what-branch)

From
SRSeth Robertson <in-gitvger@baka.org>
Date
Sep 23, 2010, 14:27 UTC
Message-ID
<201009231427.o8NERBqF019672@no.baka.org>
In-Reply-To
<32741263.335615.1285247653984.JavaMail.root@mail.hq.genarts.com>

In message <32741263.335615.1285247653984.JavaMail.root@mail.hq.genarts.com>, S tephen Bash writes:

    ----- Original Message -----
    > From: "Seth Robertson" <in-gitvger@baka.org>
    > To: "Artur Skawina" <art.08.09@gmail.com>
    > Cc: "Stefan Haller" <lists@haller-berlin.de>, git@vger.kernel.org
    > Sent: Wednesday, September 22, 2010 7:26:19 PM
    > Subject: Re: Find out on which branch a commit was originally made) (was ANNOUNCE git-what-branch)
    >
    > ... I wanted something completely different. Something more
    > like: if a bug was introduced in commit X, what releases or branches
    > has it contaminated (or more positively, if a feature was introduced,
    > where was it made available). The simple case is figuring out on
    > which branch a commit was originally made.
    Wait... When you restate the problem that way, isn't
    git-{branch,tag} --contains the right answer?  I'm curious how you
    (and others) would differentiate the approaches...

Oh, it is, don't get me wrong. I actually use `git-branch --contains` in the script to generate my candidate list. This doesn't solve the cherry-pick problem, but I don't solve that either (yet). I found it difficult to verbalize exactly why this was needed--I know I have needed it in the past which was why I pounced on the thread and used the ideas to write git-what-branch http://github.com/SethRobertson/git-what-branch

    If I were to frame this discussion, I think the value of
    git-what-branch is the ability to extract the branch name that a
    commit was created on.  In many environments the branch name may
    be useless (see the i18n example earlier in this discussion), but
    at least in our corporate environment, branches (especially those
    that are going to merge into mainline development) are named very
    consistently.  So in our situation the branch name can produce
    information that may not be captured in the standard reporting
    products (branch names transform into conventional tag names,
    branch names imply a lead developer, branch names spur developers'
    memories, ...).

Exactly. The ability to see if a commit was born on a branch or what branch it was merged to first is what is most important (anonymous branches do exist even if you try to use --rebase consistently) so the ability to find which branch it merged into first is also important. This is the default operating mode of git-what-branch.

To a lesser extent, fornensics to help understanding how a commit merged into a specific target may also be interesting. It would be even nicer if we could express a path of interest to gitk so that you could have that specific path highlighted in a `gitk --all` output.

Hmm. Path/commit highlighting would be a nice feature in gitk no matter what. --highlight-stdin to highlight specific commits (and ideally an algorithm to allow the connecting arcs for adjancent commits to be highlighted. There is already an interestedin hammer Also being able to highlight specific commits at runtime (probably a different color) and potentially enter a commit note would be pretty cool as well. Unfortunately I have a different skill-set.

					-Seth Robertson
Previous: Seth RobertsonNext: Stefan Haller
Message 31 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.