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

Re: [PATCH] rebase -i: inform the user they can re-order commits

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 20, 2012, 23:07 UTC
Message-ID
<7vobrq50su.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vlin0ip9l.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> Having said that, I do not personally care about this too deeply.  Let's
> queue a reworded Nelson's patch so it is not lost while waiting for others
> to chime in.
>
> How about this?  I avoided phrases "applying commit" (incorrect: you apply
> patches, and you replay or cherry-pick commits) and "history" (to people
> who know, it is redundant; to people who don't, it is vague mystery), but
> added one more useful reminder (top to bottom).

I didn't hear anything from anybody on this one, so I take it that nobody deeply cares either way.

I'll queue this to 'next' so that we can start the post-1.7.10 cycle with this patch.

-- >8 --
Subject: [PATCH] rebase -i: remind that the lines are top-to-bottom

Nelson Benitez Leon opened a discussion with a patch with this in the note:

    Hi, I was using git rebase -i for some time now and never occured to
    me I could reorder the commit lines to affect the order the commits
    are applied, learnt that recently from a git tutorial.

Nelson's patch was to stress the fact that the lines in the insn sheet can be re-ordered in a much more verbose way. Let's add a one-liner reminder and also remind that the lines in the insn sheet is read from top to bottom, unlike the "git log" output.

Discussion-triggered-by: Nelson Benitez Leon
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 git-rebase--interactive.sh |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 5812222..2b7eb6d 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -846,6 +846,8 @@ cat >> "$todo" << EOF
 #  f, fixup = like "squash", but discard this commit's log message
 #  x, exec = run command (the rest of the line) using shell
 #
+# These lines can be re-ordered; they are executed from top to bottom.
+#
 # If you remove a line here THAT COMMIT WILL BE LOST.
 # However, if you remove everything, the rebase will be aborted.
 #
-- 
1.7.10.rc1.63.g3c4e6
Previous: Junio C HamanoNext: Matthieu Moy
Message 13 of 15 in “rebase -i: inform the user they can re-order commits”
  1. rebase -i: inform the user they can re-order commitsNelson Benitez Leon, Mar 16, 2012
  2. Matthieu MoyMar 16, 2012
  3. Nelson Benitez LeonMar 16, 2012
  4. Matthieu MoyMar 16, 2012
  5. Jakub NarebskiMar 16, 2012
  6. Junio C HamanoMar 16, 2012
  7. Nelson Benitez LeonMar 16, 2012
  8. Matthieu MoyMar 16, 2012
  9. Junio C HamanoMar 16, 2012
  10. Matthieu MoyMar 16, 2012
  11. Junio C HamanoMar 16, 2012
  12. Junio C HamanoMar 16, 2012
  13. Junio C HamanoMar 20, 2012
  14. Matthieu MoyMar 21, 2012
  15. Philip OakleyMar 21, 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.