Skip to contentSkip to conversation

doc/gitcli: minor fixes

PATCH Superseded Dirk Gouders 3 participants 12 messages Nov 14 – Nov 24 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc/gitcli: minor fixes

Fix three details in the gitcli documentation:

Use plural where appropriate and imperative form when rules are listed.

---
 Documentation/gitcli.adoc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/gitcli.adoc +4 -4
index 9c4598e29c..6b0a58938a 100644
@@ -8,7 +8,7 @@ gitcli - Git command-line interface and conventions
 DESCRIPTION
 -----------
 
-This manual describes the convention used throughout Git CLI.
+This manual describes the conventions used throughout Git CLI.
 
 Many commands take revisions (most often "commits", but sometimes
 "tree-ish", depending on the context and command) and paths as their
@@ -28,7 +28,7 @@ arguments.  Here are the rules:
    `v1.0` and `v2.0` are revisions and `arch/x86` and `include/asm-x86`
    are paths.
 
- * When an argument can be misunderstood as either a revision or a path,
+ * When arguments can be misunderstood as either a revision or a path,
    they can be disambiguated by placing `--` between them.
    E.g. `git diff -- HEAD` is, "I have a file called HEAD in my work
    tree.  Please show changes between the version I staged in the index
@@ -76,8 +76,8 @@ you will.
 Here are the rules regarding the "flags" that you should follow when you are
 scripting Git:
 
- * Splitting short options to separate words (prefer `git foo -a -b`
-   to `git foo -ab`, the latter may not even work).
+ * Split short options to separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).
 
  * When a command-line option takes an argument, use the 'stuck' form.  In
    other words, write `git foo -oArg` instead of `git foo -o Arg` for short
Signature · 1 line
2.55.0
#1 lore raw

Documentation/gitcli.adoc gitcli - Git command-line interface and conventions · line 11

Quoted 2 lines · Dirk Gouders
Documentation/gitcli.adoc +1 -1
-This manual describes the convention used throughout Git CLI.
+This manual describes the conventions used throughout Git CLI.

OK.

Documentation/gitcli.adoc arguments. Here are the rules: · line 32

Quoted 7 lines
Documentation/gitcli.adoc +1 -1
@@ -28,7 +28,7 @@ arguments.  Here are the rules:
    `v1.0` and `v2.0` are revisions and `arch/x86` and `include/asm-x86`
    are paths.
 
- * When an argument can be misunderstood as either a revision or a path,
+ * When arguments can be misunderstood as either a revision or a path,
    they can be disambiguated by placing `--` between them.

I would rather have left the subject as-is, and then rewrote the conclusion part to "it can be disambiguated by placing -- before or arter it". Once you start talking about multiple arguments, you would have to also reorder them so that all revs come first, then '--', and then all paths.

Documentation/gitcli.adoc you will. · line 80

Quoted 8 lines
Documentation/gitcli.adoc +2 -2
@@ -76,8 +76,8 @@ you will.
 Here are the rules regarding the "flags" that you should follow when you are
 scripting Git:
 
- * Splitting short options to separate words (prefer `git foo -a -b`
-   to `git foo -ab`, the latter may not even work).
+ * Split short options to separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).

OK.

Thanks.

#2 lore raw
Quoted 11 lines · Junio C Hamano

Documentation/gitcli.adoc gitcli - Git command-line interface and conventions · line 11

Quoted 2 lines · Dirk Gouders
Documentation/gitcli.adoc +1 -1
-This manual describes the convention used throughout Git CLI.
+This manual describes the conventions used throughout Git CLI.

OK.

Quoted 4 lines
Documentation/gitcli.adoc +0 -0
@@ -28,7 +28,7 @@ arguments.  Here are the rules:
    `v1.0` and `v2.0` are revisions and `arch/x86` and `include/asm-x86`
    are paths.
 
Quoted 9 lines

Documentation/gitcli.adoc arguments. Here are the rules: · line 32

Quoted 3 lines
Documentation/gitcli.adoc +1 -1
- * When an argument can be misunderstood as either a revision or a path,
+ * When arguments can be misunderstood as either a revision or a path,
    they can be disambiguated by placing `--` between them.

I would rather have left the subject as-is, and then rewrote the conclusion part to "it can be disambiguated by placing -- before or arter it". Once you start talking about multiple arguments, you would have to also reorder them so that all revs come first, then '--', and then all paths.

Thank you for the quick review.

Yes, there were two possible fixes for this second detail. I will send a v2 according to your suggestion.

Regards,

Dirk

Quoted 12 lines

Documentation/gitcli.adoc you will. · line 80

Quoted 8 lines
Documentation/gitcli.adoc +2 -2
@@ -76,8 +76,8 @@ you will.
 Here are the rules regarding the "flags" that you should follow when you are
 scripting Git:
 
- * Splitting short options to separate words (prefer `git foo -a -b`
-   to `git foo -ab`, the latter may not even work).
+ * Split short options to separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).

OK.

Thanks.

#3 lore raw

PATCH v2 1/1 doc/gitcli: minor fixes

In reply to Dirk Gouders

Fix three details in the gitcli documentation:

Use plural/singular where appropriate and imperative form when rules are listed.

---
 Documentation/gitcli.adoc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/gitcli.adoc +4 -4
index 9c4598e29c..454c482a50 100644
@@ -8,7 +8,7 @@ gitcli - Git command-line interface and conventions
 DESCRIPTION
 -----------
 
-This manual describes the convention used throughout Git CLI.
+This manual describes the conventions used throughout Git CLI.
 
 Many commands take revisions (most often "commits", but sometimes
 "tree-ish", depending on the context and command) and paths as their
@@ -29,7 +29,7 @@ arguments.  Here are the rules:
    are paths.
 
  * When an argument can be misunderstood as either a revision or a path,
-   they can be disambiguated by placing `--` between them.
+   it can be disambiguated by placing `--` before or after it.
    E.g. `git diff -- HEAD` is, "I have a file called HEAD in my work
    tree.  Please show changes between the version I staged in the index
    and what I have in the work tree for that file", not "show the difference
@@ -76,8 +76,8 @@ you will.
 Here are the rules regarding the "flags" that you should follow when you are
 scripting Git:
 
- * Splitting short options to separate words (prefer `git foo -a -b`
-   to `git foo -ab`, the latter may not even work).
+ * Split short options to separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).
 
  * When a command-line option takes an argument, use the 'stuck' form.  In
    other words, write `git foo -oArg` instead of `git foo -o Arg` for short
Signature · 1 line
2.55.0
#4 lore raw

PATCH v3 1/1 doc/gitcli: minor fixes

In reply to Dirk Gouders

Fix three details in the gitcli documentation:

Use plural/singular where appropriate and imperative form when rules are listed.

---
Please disregard v2, I forgot to Cc the reviewer and to add the range-diff.

Changes in v3:
- Resent with proper Cc and range-diff against v1.

Changes in v2:
- Addressed feedback on the second part of the change.

 Documentation/gitcli.adoc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/gitcli.adoc +4 -4
index 9c4598e29c..454c482a50 100644
@@ -8,7 +8,7 @@ gitcli - Git command-line interface and conventions
 DESCRIPTION
 -----------
 
-This manual describes the convention used throughout Git CLI.
+This manual describes the conventions used throughout Git CLI.
 
 Many commands take revisions (most often "commits", but sometimes
 "tree-ish", depending on the context and command) and paths as their
@@ -29,7 +29,7 @@ arguments.  Here are the rules:
    are paths.
 
  * When an argument can be misunderstood as either a revision or a path,
-   they can be disambiguated by placing `--` between them.
+   it can be disambiguated by placing `--` before or after it.
    E.g. `git diff -- HEAD` is, "I have a file called HEAD in my work
    tree.  Please show changes between the version I staged in the index
    and what I have in the work tree for that file", not "show the difference
@@ -76,8 +76,8 @@ you will.
 Here are the rules regarding the "flags" that you should follow when you are
 scripting Git:
 
- * Splitting short options to separate words (prefer `git foo -a -b`
-   to `git foo -ab`, the latter may not even work).
+ * Split short options to separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).
 
  * When a command-line option takes an argument, use the 'stuck' form.  In
    other words, write `git foo -oArg` instead of `git foo -o Arg` for short

Range-diff against v1:
1: 1393397087 ! 1: 7f44bbde6b doc/gitcli: minor fixes
@@ Commit message

Fix three details in the gitcli documentation:

- Use plural where appropriate and imperative form when rules are
- listed.
+ Use plural/singular where appropriate and imperative form when rules
+ are listed.

@@ Documentation/gitcli.adoc: gitcli - Git command-line interface and conventions
Many commands take revisions (most often "commits", but sometimes "tree-ish", depending on the context and command) and paths as their
@@ Documentation/gitcli.adoc: arguments. Here are the rules:
- v1.0 and v2.0 are revisions and arch/x86 and include/asm-x86
are paths.

-- * When an argument can be misunderstood as either a revision or a path, -+ * When arguments can be misunderstood as either a revision or a path,
- they can be disambiguated by placing -- between them.
+ * When an argument can be misunderstood as either a revision or a path,
+- they can be disambiguated by placing -- between them.
++ it can be disambiguated by placing -- before or after it.
E.g. git diff -- HEAD is, "I have a file called HEAD in my work tree. Please show changes between the version I staged in the index
+ and what I have in the work tree for that file", not "show the difference
@@ Documentation/gitcli.adoc: you will.
Here are the rules regarding the "flags" that you should follow when you are scripting Git:

Signature · 1 line
2.55.0
#5 lore raw
Quoted 4 lines · Dirk Gouders

Fix three details in the gitcli documentation:

Use plural/singular where appropriate and imperative form when rules are listed.

The introduction promises a list of three, but only as single point follows. The message should mention the change to the '--' rule.

Documentation/gitcli.adoc you will. · line 80

Quoted 4 lines

- * Splitting short options to separate words (prefer git foo -a -b

Documentation/gitcli.adoc +2 -1
-   to `git foo -ab`, the latter may not even work).
+ * Split short options to separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).

Nit: "into separate words" reads more naturally, although "to" was already there before.

#6 lore raw
Quoted 8 lines · Andy Koppe
Quoted 4 lines · Dirk Gouders

Fix three details in the gitcli documentation:

Use plural/singular where appropriate and imperative form when rules are listed.

The introduction promises a list of three, but only as single point follows. The message should mention the change to the '--' rule.

I somehow thought that "three" was a count of patch hunks, i.e., locations that needed fixes were (1) the introductory text in the DESCRIPTION text, (2) a bullet point on argument disambiguation, and
(3) another bullet point on not bundling multiple short options.

Or perhaps I misunderstood your comment, specifically the "only as single point follows" part. I assumed that the single thing is that the patch corrects number agreement and uses imperative for rules, and I didn't think the issue you had with it was that there are not three grammatical things (they are two).

Quoted 7 lines

Documentation/gitcli.adoc you will. · line 80

Quoted 4 lines

- * Splitting short options to separate words (prefer git foo -a -b

Documentation/gitcli.adoc +2 -1
-   to `git foo -ab`, the latter may not even work).
+ * Split short options to separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).

Nit: "into separate words" reads more naturally, although "to" was already there before.

Yes, that does read better.

Shall we mark the topic as ready for 'next' as is, or do you want to do v4 with a (hopefully final) small revision, Dirk?

Thanks both for writing and reviewing.

#7 lore raw
Quoted 16 lines · Junio C Hamano
Quoted 8 lines · Andy Koppe
Quoted 4 lines · Dirk Gouders

Fix three details in the gitcli documentation:

Use plural/singular where appropriate and imperative form when rules are listed.

The introduction promises a list of three, but only as single point follows. The message should mention the change to the '--' rule.

I somehow thought that "three" was a count of patch hunks, i.e., locations that needed fixes were (1) the introductory text in the DESCRIPTION text, (2) a bullet point on argument disambiguation, and
(3) another bullet point on not bundling multiple short options.

Quoted 5 lines

Or perhaps I misunderstood your comment, specifically the "only as single point follows" part. I assumed that the single thing is that the patch corrects number agreement and uses imperative for rules, and I didn't think the issue you had with it was that there are not three grammatical things (they are two).

As far as I can tell, the "three" stands as is:

1. plural
2. singular
3. imperative

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

- * Splitting short options to separate words (prefer git foo -a -b

Documentation/gitcli.adoc +2 -1
-   to `git foo -ab`, the latter may not even work).
+ * Split short options to separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).
Quoted 7 lines
Quoted 2 lines

Nit: "into separate words" reads more naturally, although "to" was already there before.

Yes, that does read better.

Shall we mark the topic as ready for 'next' as is, or do you want to do v4 with a (hopefully final) small revision, Dirk?

If it is OK to put it in, I can fix the "to", as well (increments to four, then ;-)).

It would help me to improve on my workflow, so I will send a v4.

Dirk

#8 lore raw

PATCH v4 1/1 doc/gitcli: minor fixes

In reply to Dirk Gouders

Fix some grammar issues in the gitcli documentation:

- use plural/singular where appropriate
- use imperative form when rules are listed
- fix a typo in the first rule regarding flags

---
Changes in v4:
- Reword the commit message and clearly list the changes
- Fix a typo in the first rule regarding flags as suggested by Andy Koppe
- Link to v3: https://patch.msgid.link/[email protected]

Changes in v3:
- Resent with proper Cc and range-diff against v1.

Changes in v2:
- Addressed feedback on the second part of the change.

Range-diff versus v3:

1: 2005f5ce9e ! 1: d844b9957e doc/gitcli: minor fixes
@@ Metadata
## Commit message ##
doc/gitcli: minor fixes

- Fix three details in the gitcli documentation:
+ Fix some grammar issues in the gitcli documentation:

- Use plural where appropriate and imperative form when rules are
- listed.
+ - use plural/singular where appropriate
+ - use imperative form when rules are listed
+ - fix a typo in the first rule regarding flags

@@ Documentation/gitcli.adoc: you will.

- * Splitting short options to separate words (prefer git foo -a -b
- to git foo -ab, the latter may not even work).
-+ * Split short options to separate words: prefer git foo -a -b ++ * Split short options into separate words: prefer git foo -a -b
+ to git foo -ab (the latter may not even work).

* When a command-line option takes an argument, use the 'stuck' form. In

---
 Documentation/gitcli.adoc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/gitcli.adoc +4 -4
index 9c4598e29c..78708aeccb 100644
@@ -8,7 +8,7 @@ gitcli - Git command-line interface and conventions
 DESCRIPTION
 -----------
 
-This manual describes the convention used throughout Git CLI.
+This manual describes the conventions used throughout Git CLI.
 
 Many commands take revisions (most often "commits", but sometimes
 "tree-ish", depending on the context and command) and paths as their
@@ -28,7 +28,7 @@ arguments.  Here are the rules:
    `v1.0` and `v2.0` are revisions and `arch/x86` and `include/asm-x86`
    are paths.
 
- * When an argument can be misunderstood as either a revision or a path,
+ * When arguments can be misunderstood as either a revision or a path,
    they can be disambiguated by placing `--` between them.
    E.g. `git diff -- HEAD` is, "I have a file called HEAD in my work
    tree.  Please show changes between the version I staged in the index
@@ -76,8 +76,8 @@ you will.
 Here are the rules regarding the "flags" that you should follow when you are
 scripting Git:
 
- * Splitting short options to separate words (prefer `git foo -a -b`
-   to `git foo -ab`, the latter may not even work).
+ * Split short options into separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).
 
  * When a command-line option takes an argument, use the 'stuck' form.  In
    other words, write `git foo -oArg` instead of `git foo -o Arg` for short

---
base-commit: 7fb6055e678f800320d8ab8cd8f201d9493d1ba0
change-id: 20261123-b4-gitcli-f73a1b659c78

#9 lore raw
Quoted 2 lines · Dirk Gouders

- Reword the commit message and clearly list the changes
- Fix a typo in the first rule regarding flags as suggested by Andy Koppe

OK.

Quoted 3 lines

- * When an argument can be misunderstood as either a revision or a path,
+ * When arguments can be misunderstood as either a revision or a path, they can be disambiguated by placing -- between them.

Hmph, an earlier iteration I saw had "by placing -- before or after it" and talked about a single argument.

https://lore.kernel.org/git/[email protected]/

And I thought it was much less error prone than this latest version.

"git log main next" where both main and next exist as both a file and a branch, and what you meant was to trace the changes made to file 'main' up to the tip of the 'next' branch, you cannot just put -- in between, i.e., "git log next -- main", but the new text does not tell the readers that they may have to swap.

"git log main" where main both exists as both a file and a branch, you would do "git log -- main" to trace the history of file 'main' up to the currently checked out commit, or "git log main --" to show the history leading to the tip of 'main'. And the earlier text captured exactly that.

So, while all the other parts of this v4 may improve over v3, I think this part is a regression.

#10 lore raw
Quoted 24 lines · Junio C Hamano
Quoted 2 lines · Dirk Gouders

- Reword the commit message and clearly list the changes
- Fix a typo in the first rule regarding flags as suggested by Andy Koppe

OK.

Quoted 3 lines

- * When an argument can be misunderstood as either a revision or a path,
+ * When arguments can be misunderstood as either a revision or a path, they can be disambiguated by placing -- between them.

Hmph, an earlier iteration I saw had "by placing -- before or after it" and talked about a single argument.

https://lore.kernel.org/git/[email protected]/

And I thought it was much less error prone than this latest version.

"git log main next" where both main and next exist as both a file and a branch, and what you meant was to trace the changes made to file 'main' up to the tip of the 'next' branch, you cannot just put -- in between, i.e., "git log next -- main", but the new text does not tell the readers that they may have to swap.

Quoted 8 lines

"git log main" where main both exists as both a file and a branch, you would do "git log -- main" to trace the history of file 'main' up to the currently checked out commit, or "git log main --" to show the history leading to the tip of 'main'. And the earlier text captured exactly that.

So, while all the other parts of this v4 may improve over v3, I think this part is a regression.

I'm very sorry. I used the additional round to try to migrate the running topic to b4 and obviously failed in this detail. I didn't mean to change this back to v1 -- your review comment to v1 was very understandable.

Dirk

#11 lore raw

PATCH v5 1/1 doc/gitcli: minor fixes

In reply to Dirk Gouders

Fix some grammar issues in the gitcli documentation:

- use plural/singular where appropriate
- use imperative form when rules are listed
- fix a typo in the first rule regarding flags

---
Changes in v5:
- Restore a lost change caused by wrong tooling.
- Link to v4: https://patch.msgid.link/[email protected]

Changes in v4:
- Reword the commit message and clearly list the changes
- Fix a typo in the first rule regarding flags as suggested by Andy Koppe
- Link to v3: https://patch.msgid.link/[email protected]

Changes in v3:
- Resent with proper Cc and range-diff against v1.

Changes in v2:
- Addressed feedback on the second part of the change.

Range-diff versus v4:

1: 19c1ee5260 ! 1: 147ae7818c doc/gitcli: minor fixes
@@ Documentation/gitcli.adoc: gitcli - Git command-line interface and conventions
Many commands take revisions (most often "commits", but sometimes "tree-ish", depending on the context and command) and paths as their
@@ Documentation/gitcli.adoc: arguments. Here are the rules:
- v1.0 and v2.0 are revisions and arch/x86 and include/asm-x86
are paths.

-- * When an argument can be misunderstood as either a revision or a path, -+ * When arguments can be misunderstood as either a revision or a path,
- they can be disambiguated by placing -- between them.
+ * When an argument can be misunderstood as either a revision or a path,
+- they can be disambiguated by placing -- between them.
++ it can be disambiguated by placing -- before or after it.
E.g. git diff -- HEAD is, "I have a file called HEAD in my work tree. Please show changes between the version I staged in the index
+ and what I have in the work tree for that file", not "show the difference
@@ Documentation/gitcli.adoc: you will.
Here are the rules regarding the "flags" that you should follow when you are scripting Git:

---
 Documentation/gitcli.adoc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/gitcli.adoc +4 -4
index 9c4598e29c..775dd8ee09 100644
@@ -8,7 +8,7 @@ gitcli - Git command-line interface and conventions
 DESCRIPTION
 -----------
 
-This manual describes the convention used throughout Git CLI.
+This manual describes the conventions used throughout Git CLI.
 
 Many commands take revisions (most often "commits", but sometimes
 "tree-ish", depending on the context and command) and paths as their
@@ -29,7 +29,7 @@ arguments.  Here are the rules:
    are paths.
 
  * When an argument can be misunderstood as either a revision or a path,
-   they can be disambiguated by placing `--` between them.
+   it can be disambiguated by placing `--` before or after it.
    E.g. `git diff -- HEAD` is, "I have a file called HEAD in my work
    tree.  Please show changes between the version I staged in the index
    and what I have in the work tree for that file", not "show the difference
@@ -76,8 +76,8 @@ you will.
 Here are the rules regarding the "flags" that you should follow when you are
 scripting Git:
 
- * Splitting short options to separate words (prefer `git foo -a -b`
-   to `git foo -ab`, the latter may not even work).
+ * Split short options into separate words: prefer `git foo -a -b`
+   to `git foo -ab` (the latter may not even work).
 
  * When a command-line option takes an argument, use the 'stuck' form.  In
    other words, write `git foo -oArg` instead of `git foo -o Arg` for short

---
base-commit: 7fb6055e678f800320d8ab8cd8f201d9493d1ba0
change-id: 20261123-b4-gitcli-f73a1b659c78