git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND v2] git-rebase.txt: rewrite docu for fixup/squash (again)
@ 2023-10-23 13:00 Oswald Buddenhagen
  2023-10-23 16:01 ` Phillip Wood
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Oswald Buddenhagen @ 2023-10-23 13:00 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Phillip Wood, Christian Couder, Charvi Mendiratta,
	Marc Branchaud

Create a clear top-down structure which makes it hopefully unambiguous
what happens when.

Also mention the timestamp along with the author - this is primarily
meant to include the keywords somebody might be searching for, like I
did a year ago.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>

---
v2:
- slight adjustments inspired by marc. however, i left most things
  unchanged or even went in the opposite direction, because i assume the
  readers to be sufficiently context-sensitive, and the objective is
  merely to be not actively confusing. adding redundancy in the name of
  clarity would just make the text stylistically inferior and arguably
  harder to read.

Cc: Junio C Hamano <gitster@pobox.com>
Cc: Phillip Wood <phillip.wood123@gmail.com>
Cc: Christian Couder <christian.couder@gmail.com>
Cc: Charvi Mendiratta <charvi077@gmail.com>
Cc: Marc Branchaud <marcnarc@xiplink.com>
---
 Documentation/git-rebase.txt | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index e7b39ad244..337df9ef2f 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -890,20 +890,21 @@ command "pick" with the command "reword".
 To drop a commit, replace the command "pick" with "drop", or just
 delete the matching line.
 
-If you want to fold two or more commits into one, replace the command
-"pick" for the second and subsequent commits with "squash" or "fixup".
-If the commits had different authors, the folded commit will be
-attributed to the author of the first commit.  The suggested commit
-message for the folded commit is the concatenation of the first
-commit's message with those identified by "squash" commands, omitting the
-messages of commits identified by "fixup" commands, unless "fixup -c"
-is used.  In that case the suggested commit message is only the message
-of the "fixup -c" commit, and an editor is opened allowing you to edit
-the message.  The contents (patch) of the "fixup -c" commit are still
-incorporated into the folded commit. If there is more than one "fixup -c"
-commit, the message from the final one is used.  You can also use
-"fixup -C" to get the same behavior as "fixup -c" except without opening
-an editor.
+If you want to fold two or more commits into one (that is, to combine
+their contents/patches), replace the command "pick" for the second and
+subsequent commits with "squash" or "fixup".
+The commit message for the folded commit is the concatenation of the
+message of the first commit with those of commits identified by "squash"
+commands, omitting those of commits identified by "fixup" commands,
+unless "fixup -c" is used. In the latter case, the message is obtained
+only from the "fixup -c" commit (having more than one of these is
+incorrect).
+If the resulting commit message is a concatenation of multiple messages,
+an editor is opened allowing you to edit it. This is also the case for a
+message obtained via "fixup -c", while using "fixup -C" instead skips
+the editor; this is analogous to the behavior of `git commit`.
+The first commit which contributes to the suggested commit message also
+determines the author, along with the date/timestamp.
 
 `git rebase` will stop when "pick" has been replaced with "edit" or
 when a command fails due to merge errors. When you are done editing
-- 
2.42.0.419.g70bf8a5751


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-10-31 18:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-23 13:00 [RESEND v2] git-rebase.txt: rewrite docu for fixup/squash (again) Oswald Buddenhagen
2023-10-23 16:01 ` Phillip Wood
2023-10-23 17:52   ` Oswald Buddenhagen
2023-10-24  9:22     ` Phillip Wood
2023-10-24 17:19       ` Junio C Hamano
2023-10-23 16:59 ` Taylor Blau
2023-10-24 21:31   ` Oswald Buddenhagen
2023-10-24 14:01 ` Marc Branchaud
2023-10-24 21:19   ` Oswald Buddenhagen
2023-10-27 12:39     ` Marc Branchaud
2023-10-27 13:08       ` Oswald Buddenhagen
2023-10-25 10:29 ` [PATCH v3] " Oswald Buddenhagen
2023-10-27 13:14   ` Marc Branchaud
2023-10-27 16:12     ` Oswald Buddenhagen
2023-10-27 23:34     ` Junio C Hamano
2023-10-31 18:48       ` Marc Branchaud
2023-10-30  9:55     ` Phillip Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).