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

Re: Symmetric of rebase / more intelligent cherry-pick

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 11, 2011, 22:23 UTC
Message-ID
<20111011222138.GA3768@elie.hsd1.il.comcast.net>
In-Reply-To
<7vty7fdxql.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 6 quoted lines
> We actually have half of that filtering in "--cherry-pick" that was
> introduced in d7a17ca (git-log --cherry-pick A...B, 2007-04-09).
>
> Perhaps the recent cherry-pick that allows multiple commits to be picked
> should use that option (i.e. a "log --cherry-pick --right-only ..@{u}"
> equivalent) when coming up with which commits to apply?
No UI ideas from me, but I have a script like this sitting in $HOME/bin:
 base=$1 topic=$2
 git rev-list $base..HEAD |
 git diff-tree -s --pretty=raw --stdin |
 sed -ne 's/(cherry picked from commit \([0-9a-f]*\))/\1/p' |
 xargs git cherry-pick -x -s \
   --cherry-pick --right-only --no-merges HEAD...$topic \
   --not $base
Previous: Junio C Hamano
Message 4 of 4 in “Symmetric of rebase / more intelligent cherry-pick”
  1. Lionel Elie MamaneOct 11, 2011
  2. Junio C HamanoOct 11, 2011
  3. Junio C HamanoOct 11, 2011
  4. Jonathan NiederOct 11, 2011

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.