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

Re: [PATCH 2/2] learn to pick/revert into unborn branch

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 23, 2012, 19:35 UTC
Message-ID
<7vvcbso93f.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7v4njcpof8.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> Yes, and I do not think it is an implementation detail.
>
> I am not opposed to an "internal use" of the cherry-pick machinery to
> implement a corner case of "rebase -i":
> ...
> In step 4., you would be internally using the cherry-pick machinery
> to implement the step of "rebase -i" sequence.  That is what I would
> call an implementation detail.  And that is cherry-picking to the
> root.  It transplants something that used to depend on the entire
> history behind it ...

Just to add another example, I do not think I would be opposed to the case where you "edit" the root commit in the above example, i.e. keeping the "Hello world" as the root commit, but modifying its tree and/or log message. The internal impemenation detail has to first chery-pick that existing commit on top of a void state before it gives the user a chance to tweak the tree and commit the result with a modified log message. Just like "commit --amend" can be used to amend the root commit, it logically makes sense the recreated commit records nothing as its parent if done when HEAD is not valid yet.

Previous: Junio C HamanoNext: Martin von Zweigbergk
Message 9 of 11 in “tests: move test_cmp_rev to test-lib-functions”
  1. 1/2 tests: move test_cmp_rev to test-lib-functionsMartin von Zweigbergk, Dec 21, 2012
  2. 2/2 learn to pick/revert into unborn branchMartin von Zweigbergk, Dec 21, 2012
  3. Junio C HamanoDec 23, 2012
  4. Martin von ZweigbergkDec 23, 2012
  5. Christian CouderDec 23, 2012
  6. Junio C HamanoDec 23, 2012
  7. Philip OakleyDec 23, 2012
  8. Junio C HamanoDec 23, 2012
  9. Junio C HamanoDec 23, 2012
  10. Martin von ZweigbergkDec 24, 2012
  11. Junio C HamanoDec 23, 2012

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.