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

Re: how to keeping track of cherry-pick?

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2009, 01:29 UTC
Message-ID
<7vfxjdjvk8.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<497663E4.4000302@telenor.com>
Knut Olav Bøhmer <knut-olav.bohmer@telenor.com> writes:
Show 6 quoted lines
> svnmerge.py can give us a list of revisions available for merging. The
> result is similar to "git log --chery-pick master..dev" The difference
> is that svnmerge.py operates on revision-numbers, and --chery-pick looks
> at the diffs. The result of that is that when we get a conflict when a
> patch is cherry-picked, it will still show up as "available" when I run
> "git log --cherry-pick master..dev"
I think you are looking at it a wrong way.

Because subversion (at least the older one) does not keep track of merges, you had to track cherry-picks. But cherry-pick is not how you usually do things in git. You keep many topic branches with different doneness, and you merge well-cooked ones to the more stable integration branch while leaving others still cooking. So what you want to know is not cherry-pick status, but merge status.

Because git tracks merges, output from "git log master..$topic" gives all you need to know about $topic. The command lists changes that are still not merged to master on the $topic branch. If it is empty, $topic is already merged fully to master. Otherwise you still have things to merge.

To get a list of topics that have been merged (or not merged) to a particular integration branch, you should be able to use "git branch" with its --merged and --no-merged options. This does not list what commits each yet-to-be-merged topics have, though.

Previous: Knut Olav BøhmerNext: Knut Olav Bøhmer
Message 2 of 6 in “how to keeping track of cherry-pick?”
  1. Knut Olav BøhmerJan 20, 2009
  2. Junio C HamanoJan 21, 2009
  3. Knut Olav BøhmerJan 21, 2009
  4. Michael J GruberJan 21, 2009
  5. Junio C HamanoJan 21, 2009
  6. Johannes SchindelinJan 21, 2009

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.