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

Re: [PATCH] git-rebase.txt: use back-ticks consistently

From
Derrick Stolee <derrickstolee@github.com>
Date
Jun 28, 2022, 19:29 UTC
Message-ID
<0a640845-8207-f8fd-a9df-2fc6d91aabfd@github.com>
In-Reply-To
<a821c10b-3b55-f20a-dc4c-c5b0452d7819@gmail.com>
On 6/28/2022 5:59 AM, Phillip Wood wrote:
> Hi Stolee
> 
> On 27/06/2022 22:21, Derrick Stolee via GitGitGadget wrote:
> Thanks for doing this, I think it's fine as a single patch as all the changes are focussed making the quoting more consistent in a single file - splitting it up would be more work for you and would not really make it any easier for reviewers. I've left a few comments but it is a vast improvement as is.
Thanks for taking such a close look!
 
Show 8 quoted lines
>> -The current branch is reset to <upstream>, or <newbase> if the
>> ---onto option was supplied.  This has the exact same effect as
>> -`git reset --hard <upstream>` (or <newbase>).  ORIG_HEAD is set
>> +The current branch is reset to `<upstream>`, or `<newbase>` if the
>> +`--onto` option was supplied.  This has the exact same effect as
>> +`git reset --hard <upstream>` (or `<newbase>`). `ORIG_HEAD` is set
> 
> Unrelated to your change but I think we could lose the comma on this line if you do re-roll.
Noted. Thanks.
Show 10 quoted lines
>>   Note that a rebase merge works by replaying each commit from the working
>> -branch on top of the <upstream> branch.  Because of this, when a merge
>> +branch on top of the `<upstream>` branch.  Because of this, when a merge
>>   conflict happens, the side reported as 'ours' is the so-far rebased
>> -series, starting with <upstream>, and 'theirs' is the working branch.  In
>> -other words, the sides are swapped.
>> +series, starting with `<upstream>`, and 'theirs' is the working branch.
>> +In other words, the sides are swapped.
> 
> Here when talking about "ours" and "theirs" as the parents of a merge we use single quotes ...
Good point...
Show 8 quoted lines
>> -Because 'git rebase' replays each commit from the working branch
>> -on top of the <upstream> branch using the given strategy, using
>> -the 'ours' strategy simply empties all patches from the <branch>,
>> +Because `git rebase` replays each commit from the working branch
>> +on top of the `<upstream>` branch using the given strategy, using
>> +the `ours` strategy simply empties all patches from the `<branch>`,
> 
> Here "ours" is an option argument so I think the backquotes make sense
I agree.
Show 10 quoted lines
>> @@ -371,8 +371,8 @@ See also INCOMPATIBLE OPTIONS below.
>>   --strategy-option=<strategy-option>::
>>       Pass the <strategy-option> 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.
> 
> Here "ours" and "theirs" are options so using backquotes is probably the right thing to do, but the text is referring to the section where they are not backquoted which confused me initially.

I think your confusion makes sense. Here, we are talking about "sides" of a merge and not a strategy. I'll fix this in v2.

Show 14 quoted lines
>> -apply backend: When applying a patch, ignore changes in whitespace in
>> +'apply backend:' When applying a patch, ignore changes in whitespace in
> 
> I'm not sure if we want to say
>     'apply backend:'
> or
>     'apply' backend:
>>     -x <cmd>::
>>   --exec <cmd>::
>> -    Append "exec <cmd>" after each line creating a commit in the
>> -    final history. <cmd> will be interpreted as one or more shell
>> +    Append `exec <cmd>` after each line creating a commit in the
> 
> Lower down when talking about other todo list commands we refer to them as "pick" (with double quotes) so I wonder if we should use "exec `<cmd>`" here as it is only <cmd> that comes from the command line argument

Junio has some ideas about making this a bulletted list more clearly, so I'll try that and see what happens.

Show 8 quoted lines
>> -git rebase has two primary backends: apply and merge.  (The apply
>> -backend used to be known as the 'am' backend, but the name led to
>> -confusion as it looks like a verb instead of a noun.  Also, the merge
>> +`git rebase` has two primary backends: `apply` and `merge`.  (The `apply`
>> +backend used to be known as the `am` backend, but the name led to
>> +confusion as it looks like a verb instead of a noun.  Also, the `merge`
> 
> I think using single quotes for the backend names might make more sense as they are just names.

I was thinking of them similar to the merge strategies, but you're right that these are not used as CLI input (just something implied by --merge or --apply). I'll remove the ticks from around these uses.

>> -When the git-rebase command is run, it will first execute a "pre-rebase"
>> +When the `git rebase` command is run, it will first execute a "pre-rebase"
> 
> This is the section I was referring to earlier when talking about quoting hook names.
Excellent. Will fix.

Thanks, -Stolee

Previous: Phillip WoodNext: Ævar Arnfjörð Bjarmason
Message 3 of 19 in “git-rebase.txt: use back-ticks consistently”
  1. git-rebase.txt: use back-ticks consistentlyDerrick Stolee via GitGitGadget, Jun 27, 2022
  2. Phillip WoodJun 28, 2022
  3. Derrick StoleeJun 28, 2022
  4. Ævar Arnfjörð BjarmasonJun 28, 2022
  5. Rendering back-ticks in plaintext docs (was Re: [PATCH] git-rebase.txt: use back-ticks consistently)Derrick Stolee, Jun 28, 2022
  6. Junio C HamanoJun 28, 2022
  7. Junio C HamanoJun 28, 2022
  8. Derrick StoleeJun 28, 2022
  9. git-rebase.txt: use back-ticks consistentlyDerrick Stolee via GitGitGadget, Jun 28, 2022
  10. Junio C HamanoJun 28, 2022
  11. Phillip WoodJun 29, 2022
  12. Derrick StoleeJun 29, 2022
  13. Junio C HamanoJun 30, 2022
  14. Derrick StoleeJun 29, 2022
  15. Phillip WoodJun 29, 2022
  16. Derrick StoleeJun 29, 2022
  17. git-rebase.txt: use back-ticks consistentlyDerrick Stolee via GitGitGadget, Jun 29, 2022
  18. Phillip WoodJun 29, 2022
  19. Junio C HamanoJun 30, 2022

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.