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

Re: Symmetric of rebase / more intelligent cherry-pick

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 11, 2011, 19:36 UTC
Message-ID
<7v8vorfhhu.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20111011155444.GB14417@capsaicin.mamane.lu>
Lionel Elie Mamane <lionel@mamane.lu> writes:
> git cherry-pick ..UPSTREAM
> *nearly* does what I want, except that it lacks rebase's intelligence
> of skipping commits that do the same textual changes as a commit
> already in the current branch.

I think in the longer term "--ignore-if-in-upstream" that is known only to format-patch, which is the true source the intelligence of rebase you observed comes from, should be factored out into a helper function that can be used to filter output from get_revision() in other commands, or perhaps get_revision() itself might want to learn it.

I say "or perhaps might" above, because I do not think the general revision traversal machinery used by the log family (which cherry-pick's multi-pick option relies on) has enough information to decide what the caller means by "upstream" at the point setup_revisions() is called.

Previous: Lionel Elie MamaneNext: Junio C Hamano
Message 2 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.