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

Re: [PATCH v4 3/7] revert: add --ff option to allow fast forward when cherry-picking

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 7, 2010, 03:55 UTC
Message-ID
<7v6358dbv8.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100306203447.2960.42019.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 7 quoted lines
> From: Junio C Hamano <gitster@pobox.com>
>
> As "git merge" fast forwards if possible, it seems sensible to
> have such a feature for "git cherry-pick" too, especially as it
> could be used in git-rebase--interactive.sh.
>
> Maybe this option could be made the default in the long run,
I never said that.

For scripted use, like we can see in your [PATCH 7/7], "cherry-pick --ff" could be a good ingredient (but even then the calling Porcelain script may already know that what is being picked is a direct descendent (rebase -i certainly should, as the last commit it processed from the todo file is at the HEAD), but for manual use case it just feels silly to assume that the end user is so stupid that s/he doesn't know the commit being picked might be a direct descendant, which would be the only reason why making --ff the default might make sense.

And adding --no-ff and sprinkling that to scripts, only to support that default change as a future possibility, feels doubly silly.

What was the real motive/use case of "cherry-pick --ff"?
Previous: Christian CouderNext: Paolo Bonzini
Message 5 of 12 in “add --ff option to cherry-pick”
  1. 0/7 add --ff option to cherry-pickChristian Couder, Mar 6, 2010
  2. 1/7 parse-options: add parse_options_concat() to concat optionsChristian Couder, Mar 6, 2010
  3. 2/7 builtin/merge: make checkout_fast_forward() non staticChristian Couder, Mar 6, 2010
  4. 3/7 revert: add --ff option to allow fast forward when cherry-pickingChristian Couder, Mar 6, 2010
  5. Junio C HamanoMar 7, 2010
  6. Paolo BonziniMar 7, 2010
  7. Junio C HamanoMar 7, 2010
  8. Christian CouderMar 7, 2010
  9. 4/7 cherry-pick: add tests for new --ff optionChristian Couder, Mar 6, 2010
  10. 5/7 Documentation: describe new cherry-pick --ff optionChristian Couder, Mar 6, 2010
  11. 6/7 cherry-pick: add a no-op --no-ff option to future proof scriptsChristian Couder, Mar 6, 2010
  12. 7/7 rebase -i: use new --ff cherry-pick optionChristian Couder, Mar 6, 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.