From: Derrick Stolee via GitGitGadget Date: Tue, 28 Jun 2022 20:02:57 GMT Subject: [PATCH v2] git-rebase.txt: use back-ticks consistently Message-ID: In-Reply-To: From: Derrick Stolee While inspecting the 'git rebase' documentation, I noticed that it is inconsistent with how it uses back-ticks (or other punctuation) for identifying Git commands, command-line arguments, or values for those arguments. Sometimes, an argument (like '--interactive') would appear without any punctuation, causing the argument to not have any special formatting. Other times, arguments or 'git rebase' itself would have single-quotes giving a bold look (in the HTML documentation at least). By consistently using back-ticks, these types of strings appear in a monospace font with special highlighting to appear more clearly as text that exists in a command-line invocation of a Git command. This rather-large diff is the result of scanning git-rebase.txt and adding back-ticks as appropriate. Some are adding back-ticks where there was no punctuation. Others are replacing single quotes. There are also a few minor cleanups in the process, including those found by reviwers. Helped-by: Phillip Wood Helped-by: Junio C Hamano Signed-off-by: Derrick Stolee --- git-rebase.txt: use back-ticks consistently While I noticed this inconsistency when looking at git rebase as part of the git rebase --update-refs work, I didn't know the best way to update the document from start to finish. Feedback tells me that splitting this patch isn't worth it. Updates in v2 ============= * The 'apply' and 'merge' backends are now quoted with single quotes instead of back-ticks. (Phrases such as "the merge command" describing the todo file still use back-ticks.) * The pre-rebase hook now has back-ticks. * An unnecessary comma is removed. * When talking about 'ours' and 'theirs' as "sides" of a rebase, use single quotes. Use back-ticks only for the ours strategy. * A bulleted list is converted to use ";;" syntax. Thanks, -Stolee Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1270%2Fderrickstolee%2Frebase-docs-v2 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1270/derrickstolee/rebase-docs-v2 Pull-Request: https://github.com/gitgitgadget/git/pull/1270 Range-diff vs v1: 1: 71520dc1b71 ! 1: 02983cdb79d git-rebase.txt: use back-ticks consistently @@ Commit message adding back-ticks as appropriate. Some are adding back-ticks where there was no punctuation. Others are replacing single quotes. - There are also a few minor cleanups in the process, such as one place - that did not use tabs for the first paragraph in a bulletted list. - Another case still referred to the dashed form, but it was the only use - in the file except for the heading and NAME section. + There are also a few minor cleanups in the process, including those + found by reviwers. + Helped-by: Phillip Wood + Helped-by: Junio C Hamano Signed-off-by: Derrick Stolee ## Documentation/git-rebase.txt ## @@ Documentation/git-rebase.txt: SYNOPSIS -The current branch is reset to , or if the ---onto option was supplied. This has the exact same effect as -`git reset --hard ` (or ). ORIG_HEAD is set -+The current branch is reset to ``, or `` if the ++The current branch is reset to `` or `` if the +`--onto` option was supplied. This has the exact same effect as +`git reset --hard ` (or ``). `ORIG_HEAD` is set to point at the tip of the branch before the reset. @@ Documentation/git-rebase.txt: SYNOPSIS Assume the following history exists and the current branch is "topic": +@@ Documentation/git-rebase.txt: remain the checked-out branch. + + If the upstream branch already contains a change you have made (e.g., + because you mailed a patch which was applied upstream), then that commit +-will be skipped and warnings will be issued (if the `merge` backend is ++will be skipped and warnings will be issued (if the 'merge' backend is + used). For example, running `git rebase master` on the following + history (in which `A'` and `A` introduce the same set of changes, but + have different committer information): @@ Documentation/git-rebase.txt: would result in the removal of commits F and G: ------------ @@ Documentation/git-rebase.txt: flag exists as a convenient shortcut, such as for + See also INCOMPATIBLE OPTIONS below. +@@ Documentation/git-rebase.txt: See also INCOMPATIBLE OPTIONS below. + By default (or if `--no-reapply-cherry-picks` is given), these commits + will be automatically dropped. Because this necessitates reading all + upstream commits, this can be expensive in repos with a large number +-of upstream commits that need to be read. When using the `merge` ++of upstream commits that need to be read. When using the 'merge' + backend, warnings will be issued for each dropped commit (unless + `--quiet` is given). Advice will also be issued unless + `advice.skippedCherryPicks` is set to false (see linkgit:git-config[1]). @@ Documentation/git-rebase.txt: See also INCOMPATIBLE OPTIONS below. Using merging strategies to rebase (default). + @@ Documentation/git-rebase.txt: See also INCOMPATIBLE OPTIONS below. which makes little sense. + See also INCOMPATIBLE OPTIONS below. -@@ Documentation/git-rebase.txt: See also INCOMPATIBLE OPTIONS below. - --strategy-option=:: - Pass the through to the merge strategy. - This implies `--merge` and, if no strategy has been -- specified, `-s ort`. Note the reversal of 'ours' and -- 'theirs' as noted above for the `-m` option. -+ specified, `-s ort`. Note the reversal of `ours` and -+ `theirs` as noted above for the `-m` option. - + - See also INCOMPATIBLE OPTIONS below. - @@ Documentation/git-rebase.txt: See also INCOMPATIBLE OPTIONS below. -q:: @@ Documentation/git-rebase.txt: See also INCOMPATIBLE OPTIONS below. + this behavior: + -apply backend: When applying a patch, ignore changes in whitespace in -+'apply backend:' When applying a patch, ignore changes in whitespace in - context lines. Unfortunately, this means that if the "old" lines being - replaced by the patch differ only in whitespace from the existing - file, you will get a merge conflict instead of a successful patch - application. +-context lines. Unfortunately, this means that if the "old" lines being +-replaced by the patch differ only in whitespace from the existing +-file, you will get a merge conflict instead of a successful patch +-application. ++apply backend:;; ++ When applying a patch, ignore changes in whitespace in context ++ lines. Unfortunately, this means that if the "old" lines being ++ replaced by the patch differ only in whitespace from the existing ++ file, you will get a merge conflict instead of a successful patch ++ application. + -merge backend: Treat lines with only whitespace changes as unchanged -+'merge backend:' Treat lines with only whitespace changes as unchanged - when merging. Unfortunately, this means that any patch hunks that were - intended to modify whitespace and nothing else will be dropped, even - if the other side had no changes that conflicted. +-when merging. Unfortunately, this means that any patch hunks that were +-intended to modify whitespace and nothing else will be dropped, even +-if the other side had no changes that conflicted. ++merge backend:;; ++ Treat lines with only whitespace changes as unchanged when merging. ++ Unfortunately, this means that any patch hunks that were intended ++ to modify whitespace and nothing else will be dropped, even if the ++ other side had no changes that conflicted. --whitespace=