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

Re: [PATCH 3/7] sequencer: handle single-commit pick as special case

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 15, 2011, 21:58 UTC
Message-ID
<7v62ilujya.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0krTY+szqPrE9wxwfK76VBbFXh_Xaz8EyWZayLa_SFQTw@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 15 quoted lines
> Hi Junio,
>
> Junio C Hamano writes:
>> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>>> [...]
>> [...]
>> I do not see an inconsistency here, let alone any "glaring" one.
>
> Yeah, my commit message is totally misleading and unclear.  Yes, all
> the operations make sense to you and me; for a new user who doesn't
> understand how Git works, it's completely inconsistent at a very
> superficial level, no?  The sequence of operations he has to execute
> depends on:
> 1. If he literally specified a single commit or a commit range on the
> command-line.
But we are already in agreement on this point, I think. Didn't I say:
  It is a different story if the sequence were like this:
      $ git cherry-pick foo
      ... conflict happens
      $ edit problematicfile
      $ git add problematicfile
      $ git cherry-pick --continue
      ... This should notice CHERRY_PICK_HEAD and record it.
      ... After that, there is nothing remaining to be done.
  In other words, the user said "I want to replay this commit", the command
  couldn't finish it by itself and asked the user to help resolving the
  conflict, the user resolved and told the command to continue. The command
  should continue recording the result.
  And if "continue" does not work in this sequence, that is a bug worth
  fixing.
in the message you are responding to?
> 2. In the case of multi-commit picking, there's an additional layer of
> decision making: did the conflict occur in the last commit in the
> range?

Again, it would be the same thing. If the implementation forces that decision, that would be a bug, no?

My understanding is that multi-commit form of cherry-pick and revert intended to allow two forms of "user done helping and telling the command to continue" at any stage, be it the first, in the middle, or the last operation in a series:

 - User resolves, adds and commits, and then tells the command to
   continue. The command notices that the user has committed, and goes on
   to the next task; or
 - User resolves, adds, and then tells the command to continue. The
   command notices that the user has not committed, makes a commit and
   goes on to the next task.

I think "rebase -i" works the same way and both are valid ways to tell the command to continue.

Now, multi-commit form of cherry-pick/revert _may_ be buggy (I do not use that form often myself to know if this is the case, though) and may only allow one or the other depending on which commit in the series the user is asked to help, but if that is the case it is a bug in the implementation of the multi-commit form done back in v1.7.2 timeframe.

Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 7 of 17 in “New sequencer workflow!”
  1. 0/7 New sequencer workflow!Ramkumar Ramachandra, Nov 13, 2011
  2. 1/7 sequencer: factor code out of revert builtinRamkumar Ramachandra, Nov 13, 2011
  3. 2/7 sequencer: invalidate sequencer state without todoRamkumar Ramachandra, Nov 13, 2011
  4. 3/7 sequencer: handle single-commit pick as special caseRamkumar Ramachandra, Nov 13, 2011
  5. Junio C HamanoNov 13, 2011
  6. Ramkumar RamachandraNov 15, 2011
  7. Junio C HamanoNov 15, 2011
  8. Ramkumar RamachandraNov 16, 2011
  9. 4/7 sequencer: handle cherry-pick conflict in last commitRamkumar Ramachandra, Nov 13, 2011
  10. 5/7 sequencer: introduce git-sequencer builtinRamkumar Ramachandra, Nov 13, 2011
  11. 6/7 sequencer: teach '--continue' how to commitRamkumar Ramachandra, Nov 13, 2011
  12. 7/7 sequencer: teach parser about CHERRY_PICK_HEADRamkumar Ramachandra, Nov 13, 2011
  13. Junio C HamanoNov 13, 2011
  14. Junio C HamanoNov 14, 2011
  15. Ramkumar RamachandraNov 15, 2011
  16. Phil HordNov 15, 2011
  17. Ramkumar RamachandraNov 15, 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.