Skip to contentSkip to conversation

config doc: improve exit code listing

PATCH In review Stefan Beller 3 participants 5 messages Jun 16, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config doc: improve exit code listing

The possible reasons for exiting are now ordered by the exit code value. While at it, rewrite the can not write to the config file to the config file cannot be written to be grammatically correct and a proper sentence.

---
 Documentation/git-config.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/git-config.txt +3 -3
index 6fc08e3..6843114 100644
@@ -58,10 +58,10 @@ that location (you can say '--local' but that is the default).
 This command will fail with non-zero status upon error.  Some exit
 codes are:
 
-- The config file is invalid (ret=3),
-- can not write to the config file (ret=4),
+- The section or key is invalid (ret=1),
 - no section or name was provided (ret=2),
-- the section or key is invalid (ret=1),
+- the config file is invalid (ret=3),
+- the config file cannot be written (ret=4),
 - you try to unset an option which does not exist (ret=5),
 - you try to unset/set an option for which multiple lines match (ret=5), or
 - you try to use an invalid regexp (ret=6).
Signature · 3 lines
2.8.1.343.gb96d81e

base-commit: 3ad15fd5e17bbb73fb1161ff4e9c3ed254d5b243
#1 lore raw
Quoted 15 lines · Stefan Beller

The possible reasons for exiting are now ordered by the exit code value. While at it, rewrite the can not write to the config file to the config file cannot be written to be grammatically correct and a proper sentence.

---
 Documentation/git-config.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/git-config.txt +0 -0
index 6fc08e3..6843114 100644

Documentation/git-config.txt that location (you can say '--local' but that is the default). · line 61

Quoted 4 lines
Documentation/git-config.txt +0 -1
@@ -58,10 +58,10 @@ that location (you can say '--local' but that is the default).
 This command will fail with non-zero status upon error.  Some exit
 codes are:
 
-- The config file is invalid (ret=3),
     ^

I don't see why this is capitalised, so ...

Documentation/git-config.txt that location (you can say '--local' but that is the default). · line 61

Quoted 2 lines
Documentation/git-config.txt +1 -1
-- can not write to the config file (ret=4),
+- The section or key is invalid (ret=1),
     ^

I don't think you should transfer the capital here. ;-)

Documentation/git-config.txt that location (you can say '--local' but that is the default). · line 67

Quoted 8 lines
Documentation/git-config.txt +2 -1
 - no section or name was provided (ret=2),
-- the section or key is invalid (ret=1),
+- the config file is invalid (ret=3),
+- the config file cannot be written (ret=4),
 - you try to unset an option which does not exist (ret=5),
 - you try to unset/set an option for which multiple lines match (ret=5), or
 - you try to use an invalid regexp (ret=6).

Only a minor point.

ATB,
Ramsay Jones

#2 lore raw
Quoted 21 lines · Ramsay Jones
Quoted 18 lines · Stefan Beller

The possible reasons for exiting are now ordered by the exit code value. While at it, rewrite the can not write to the config file to the config file cannot be written to be grammatically correct and a proper sentence.

---
 Documentation/git-config.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/git-config.txt +0 -0
index 6fc08e3..6843114 100644
@@ -58,10 +58,10 @@ that location (you can say '--local' but that is the default).
 This command will fail with non-zero status upon error.  Some exit
 codes are:
 
Quoted 3 lines

Documentation/git-config.txt that location (you can say '--local' but that is the default). · line 61

Quoted 1 line
Documentation/git-config.txt +0 -1
-- The config file is invalid (ret=3),
     ^

I don't see why this is capitalised, so ...

Because the whole listing is a bunch of sentences, stringed together with commas at the end of each line. Note that there is a ',' at the end of each line, except for the last, where you see a '.'. I thought about breaking that up into a list and make all of the bullet points either a sentence (all capitalised and ending in dot) or part sentences (lower case for each bullet point, not clear about the ending)

I kept it as is in a long sentence as I expected to see lowest resistance there. ;)

Quoted 5 lines

Documentation/git-config.txt that location (you can say '--local' but that is the default). · line 61

Quoted 3 lines
Documentation/git-config.txt +1 -1
-- can not write to the config file (ret=4),
+- The section or key is invalid (ret=1),
     ^

I don't think you should transfer the capital here. ;-)

It's the first bullet point starting the long sentence.

Quoted 11 lines

Documentation/git-config.txt that location (you can say '--local' but that is the default). · line 67

Quoted 9 lines
Documentation/git-config.txt +2 -1
 - no section or name was provided (ret=2),
-- the section or key is invalid (ret=1),
+- the config file is invalid (ret=3),
+- the config file cannot be written (ret=4),
 - you try to unset an option which does not exist (ret=5),
 - you try to unset/set an option for which multiple lines match (ret=5), or
 - you try to use an invalid regexp (ret=6).

Only a minor point.

If the current state bothers you too much,
please send a patch with correct lists. :)
(Feel free to squash this patch into that or
just on top of this)

Thanks,
Stefan

Quoted 5 lines

ATB,
Ramsay Jones

#3 lore raw
Quoted 23 lines · Stefan Beller
Quoted 21 lines · Ramsay Jones
Quoted 18 lines · Stefan Beller

The possible reasons for exiting are now ordered by the exit code value. While at it, rewrite the can not write to the config file to the config file cannot be written to be grammatically correct and a proper sentence.

---
 Documentation/git-config.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/git-config.txt +0 -0
index 6fc08e3..6843114 100644
@@ -58,10 +58,10 @@ that location (you can say '--local' but that is the default).
 This command will fail with non-zero status upon error.  Some exit
 codes are:
 
Quoted 8 lines
Quoted 3 lines

Documentation/git-config.txt that location (you can say '--local' but that is the default). · line 61

Quoted 1 line
Documentation/git-config.txt +0 -1
-- The config file is invalid (ret=3),
     ^

I don't see why this is capitalised, so ...

Because the whole listing is a bunch of sentences, stringed together with commas at the end of each line. Note that there is a ',' at the end of each line, except for the last, where you see a '.'.

Heh, I hadn't noticed the commas, no - I assumed periods.

Quoted 4 lines

I thought about breaking that
up into a list and make all of the bullet points either a sentence (all capitalised and ending in dot) or part sentences (lower case for each bullet point, not clear about the ending)

That's probably what I would have done.

Quoted 2 lines

I kept it as is in a long sentence as I expected to see lowest resistance there. ;)

'One long sentence' split into a bullet/numbered list is err ... Hmm, I'm lost for words. ;-)

Quoted 6 lines
Quoted 1 line

Only a minor point.

If the current state bothers you too much,
please send a patch with correct lists. :)
(Feel free to squash this patch into that or
just on top of this)

Having said all that, (since I have very few documentation skills), I will leave this for others to improve, if necessary.

ATB,
Ramsay Jones