lots of documentation fixes/rewordings in git-init(1)
PATCH 1/1 lots of documentation fixes/rewordings in git-init(1)
Hello,
I noticed a typo in git-init(1), which led me to some related changes. All changes are in Documentation/git-init.txt. I have cc'ed the people involved (thanks git-blame), just to make sure that my changes maintain technical accuracy.
I've tested out the compiled man/html/etc. files and everything seems to look correct.
This is my first patch submission to the git project, thanks!
-L
PATCH 1/7 Documentation: git-init: typographical fixes
--- Documentation/git-init.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/git-init.txt +3 -3
@@ -43,7 +43,7 @@ OPTIONS -q:: --quiet:: -Only print error and warning messages, all other output will be suppressed. +Only print error and warning messages; all other output will be suppressed. --bare::
@@ -97,7 +97,7 @@ is given: create a repo that is readable and writable to the current user and group, but inaccessible to others. -By default, the configuration flag receive.denyNonFastForwards is enabled +By default, the configuration flag 'receive.denyNonFastForwards' is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it.
@@ -113,7 +113,7 @@ TEMPLATE DIRECTORY The template directory contains files and directories that will be copied to the `$GIT_DIR` after it is created. -The template directory used will (in order): +The template directory used will be (in order): - The argument given with the `--template` option.
Signature · 1 line
2.0.3
PATCH 2/7 Documentation: git-init: list items facelift
In reply to Linus ArverNo textual change.
--- Documentation/git-init.txt | 49 ++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 21 deletions(-)
Documentation/git-init.txt +28 -21
@@ -72,30 +72,37 @@ repository. When specified, the config variable "core.sharedRepository" is set so that files and directories under `$GIT_DIR` are created with the requested permissions. When not specified, Git will use permissions reported by umask(2). - ++ The option can have the following values, defaulting to 'group' if no value is given: ++ +-- +'umask' (or 'false'):: + +Use permissions reported by umask(2). The default, when `--shared` is not +specified. + +'group' (or 'true'):: - - 'umask' (or 'false'): Use permissions reported by umask(2). The default, - when `--shared` is not specified. - - - 'group' (or 'true'): Make the repository group-writable, (and g+sx, since - the git group may be not the primary group of all users). - This is used to loosen the permissions of an otherwise safe umask(2) value. - Note that the umask still applies to the other permission bits (e.g. if - umask is '0022', using 'group' will not remove read privileges from other - (non-group) users). See '0xxx' for how to exactly specify the repository - permissions. - - - 'all' (or 'world' or 'everybody'): Same as 'group', but make the repository - readable by all users. - - - '0xxx': '0xxx' is an octal number and each file will have mode '0xxx'. - '0xxx' will override users' umask(2) value (and not only loosen permissions - as 'group' and 'all' does). '0640' will create a repository which is - group-readable, but not group-writable or accessible to others. '0660' will - create a repo that is readable and writable to the current user and group, - but inaccessible to others. +Make the repository group-writable, (and g+sx, since the git group may be not +the primary group of all users). This is used to loosen the permissions of an +otherwise safe umask(2) value. Note that the umask still applies to the other +permission bits (e.g. if umask is '0022', using 'group' will not remove read +privileges from other (non-group) users). See '0xxx' for how to exactly specify +the repository permissions. + +'all' (or 'world' or 'everybody'):: + +Same as 'group', but make the repository readable by all users. + +'0xxx':: + +'0xxx' is an octal number and each file will have mode '0xxx'. '0xxx' will +override users' umask(2) value (and not only loosen permissions as 'group' and +'all' does). '0640' will create a repository which is group-readable, but not +group-writable or accessible to others. '0660' will create a repo that is +readable and writable to the current user and group, but inaccessible to others. +-- By default, the configuration flag 'receive.denyNonFastForwards' is enabled in shared repositories, so that you cannot force a non fast-forwarding push
Signature · 1 line
2.0.3
PATCH 3/7 Documentation: git-init: template directory: reword
In reply to Linus Arver--- Documentation/git-init.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
Documentation/git-init.txt +5 -9
@@ -113,22 +113,18 @@ line, the command is run inside the directory (possibly after creating it). -- - TEMPLATE DIRECTORY ------------------ The template directory contains files and directories that will be copied to the `$GIT_DIR` after it is created. -The template directory used will be (in order): - - - The argument given with the `--template` option. - - - The contents of the `$GIT_TEMPLATE_DIR` environment variable. - - - The `init.templatedir` configuration variable. +The template directory will be one of the following (in order): - - The default template directory: `/usr/share/git-core/templates`. +- the argument given with the `--template` option; +- the contents of the `$GIT_TEMPLATE_DIR` environment variable; +- the `init.templatedir` configuration variable; or +- the default template directory: `/usr/share/git-core/templates`. The default template directory includes some directory structure, some suggested "exclude patterns", and copies of sample "hook" files.
Signature · 1 line
2.0.3
PATCH 4/7 Documentation: git-init: --separate-git-dir: clarify
In reply to Linus Arver--- Documentation/git-init.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/git-init.txt +6 -6
@@ -57,12 +57,12 @@ DIRECTORY" section below.) --separate-git-dir=<git dir>:: -Instead of initializing the repository where it is supposed to be, -place a filesytem-agnostic Git symbolic link there, pointing to the -specified path, and initialize a Git repository at the path. The -result is Git repository can be separated from working tree. If this -is reinitialization, the repository will be moved to the specified -path. +Separate the Git repository from your working tree. Instead of initializing the +repository as a directory to either `$GIT_DIR` or `./.git/`, create a text file +there containing the path to the actual repository. This file acts as +filesystem-agnostic Git symbolic link to the repository. ++ +If this is reinitialization, the repository will be moved to the specified path. --shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
Signature · 1 line
2.0.3
PATCH 5/7 Documentation: git-init: reword parenthetical statements
In reply to Linus Arver--- Documentation/git-init.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/git-init.txt +2 -2
@@ -108,8 +108,8 @@ By default, the configuration flag 'receive.denyNonFastForwards' is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it. -If you name a (possibly non-existent) directory at the end of the command -line, the command is run inside the directory (possibly after creating it). +If you provide a 'directory', the command is run inside it. If this directory +does not exist, it will be created. --
Signature · 1 line
2.0.3
PATCH 6/7 Documentation: git-init: template directory: reword and cross-reference
In reply to Linus Arver--- Documentation/git-init.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/git-init.txt +2 -3
@@ -126,9 +126,8 @@ The template directory will be one of the following (in order): - the `init.templatedir` configuration variable; or - the default template directory: `/usr/share/git-core/templates`. -The default template directory includes some directory structure, some -suggested "exclude patterns", and copies of sample "hook" files. -The suggested patterns and hook files are all modifiable and extensible. +The default template directory includes some directory structure, suggested +"exclude patterns" (see linkgit:gitignore[5]), and sample hook files (see linkgit:githooks[5]). EXAMPLES --------
Signature · 1 line
2.0.3
PATCH 7/7 Documentation: git-init: flesh out example
In reply to Linus Arver--- Documentation/git-init.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/git-init.txt +4 -2
@@ -138,10 +138,12 @@ Start a new Git repository for an existing code base:: $ cd /path/to/my/codebase $ git init <1> $ git add . <2> +$ git commit <3> ---------------- + -<1> prepare /path/to/my/codebase/.git directory -<2> add all existing file to the index +<1> Create a /path/to/my/codebase/.git directory. +<2> Add all existing files to the index. +<3> Create the first root-commit. GIT ---
Signature · 1 line
2.0.3
Re: [PATCH 1/7] Documentation: git-init: typographical fixes
In reply to Linus ArverQuoted 10 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>--- Documentation/git-init.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Documentation/git-init.txt +0
-0
Documentation/git-init.txt OPTIONS · line 46
Quoted 5 lines
Documentation/git-init.txt +1
-1@@ -43,7 +43,7 @@ OPTIONS -q:: --quiet:: -Only print error and warning messages, all other output will be suppressed. +Only print error and warning messages; all other output will be suppressed.
OK.
Documentation/git-init.txt is given: · line 102
Quoted 10 lines
Documentation/git-init.txt +1
-1--bare::@@ -97,7 +97,7 @@ is given: create a repo that is readable and writable to the current user and group, but inaccessible to others. -By default, the configuration flag receive.denyNonFastForwards is enabled +By default, the configuration flag 'receive.denyNonFastForwards' is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it.
If you are going to quote something that the user should literally use, it is probably better to use backticks so that the quoted contents will be typeset in monospaced typewriter-font.
Documentation/git-init.txt TEMPLATE DIRECTORY · line 118
Quoted 8 lines
Documentation/git-init.txt +1
-1@@ -113,7 +113,7 @@ TEMPLATE DIRECTORY The template directory contains files and directories that will be copied to the `$GIT_DIR` after it is created. -The template directory used will (in order): +The template directory used will be (in order): - The argument given with the `--template` option.
OK.
Thanks.
Re: [PATCH 1/7] Documentation: git-init: typographical fixes
Quoted 26 lines · Junio C Hamano
Quoted 10 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>--- Documentation/git-init.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Documentation/git-init.txt +0
-0Documentation/git-init.txt OPTIONS · line 46
Quoted 5 lines
Documentation/git-init.txt +1
-1@@ -43,7 +43,7 @@ OPTIONS -q:: --quiet:: -Only print error and warning messages, all other output will be suppressed. +Only print error and warning messages; all other output will be suppressed.OK.
Quoted 6 lines
Documentation/git-init.txt +0
-0--bare::@@ -97,7 +97,7 @@ is given: create a repo that is readable and writable to the current user and group, but inaccessible to others.
Quoted 8 lines
Documentation/git-init.txt is given: · line 102
Quoted 4 lines
Documentation/git-init.txt +1
-1-By default, the configuration flag receive.denyNonFastForwards is enabled +By default, the configuration flag 'receive.denyNonFastForwards' is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it.If you are going to quote something that the user should literally use, it is probably better to use
backticksso that the quoted contents will be typeset in monospaced typewriter-font.
OK, that is simple to change.
Quoted 12 lines
Documentation/git-init.txt TEMPLATE DIRECTORY · line 118
Quoted 8 lines
Documentation/git-init.txt +1
-1@@ -113,7 +113,7 @@ TEMPLATE DIRECTORY The template directory contains files and directories that will be copied to the `$GIT_DIR` after it is created. -The template directory used will (in order): +The template directory used will be (in order): - The argument given with the `--template` option.OK.
Thanks.
Re: [PATCH 3/7] Documentation: git-init: template directory: reword
In reply to Linus ArverQuoted 2 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>---
This seems to reword and also reformat at the same time, but was the latter change (i.e. to unindent the bulletted items and to remove blank lines between items) necessary?
Quoted 35 lines
Documentation/git-init.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)Documentation/git-init.txt +5
-9@@ -113,22 +113,18 @@ line, the command is run inside the directory (possibly after creating it). -- - TEMPLATE DIRECTORY ------------------ The template directory contains files and directories that will be copied to the `$GIT_DIR` after it is created. -The template directory used will be (in order): - - - The argument given with the `--template` option. - - - The contents of the `$GIT_TEMPLATE_DIR` environment variable. - - - The `init.templatedir` configuration variable. +The template directory will be one of the following (in order): - - The default template directory: `/usr/share/git-core/templates`. +- the argument given with the `--template` option; +- the contents of the `$GIT_TEMPLATE_DIR` environment variable; +- the `init.templatedir` configuration variable; or +- the default template directory: `/usr/share/git-core/templates`. The default template directory includes some directory structure, some suggested "exclude patterns", and copies of sample "hook" files.
Re: [PATCH 3/7] Documentation: git-init: template directory: reword
Quoted 8 lines · Junio C Hamano
Quoted 2 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>---
This seems to reword and also reformat at the same time, but was the latter change (i.e. to unindent the bulletted items and to remove blank lines between items) necessary?
No, the unindenting/removal of blank lines is a non-grammar change and is not necessary, as it doesn't have any effect on the actual output (html/txt/manpage).
I can either keep the same coding style with the rewording, or chop this into two commits, one for the rewording and another for reformatting. Which one do you suggest?
Quoted 35 lines
Quoted 35 lines
Documentation/git-init.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)Documentation/git-init.txt +5
-9@@ -113,22 +113,18 @@ line, the command is run inside the directory (possibly after creating it). -- - TEMPLATE DIRECTORY ------------------ The template directory contains files and directories that will be copied to the `$GIT_DIR` after it is created. -The template directory used will be (in order): - - - The argument given with the `--template` option. - - - The contents of the `$GIT_TEMPLATE_DIR` environment variable. - - - The `init.templatedir` configuration variable. +The template directory will be one of the following (in order): - - The default template directory: `/usr/share/git-core/templates`. +- the argument given with the `--template` option; +- the contents of the `$GIT_TEMPLATE_DIR` environment variable; +- the `init.templatedir` configuration variable; or +- the default template directory: `/usr/share/git-core/templates`. The default template directory includes some directory structure, some suggested "exclude patterns", and copies of sample "hook" files.
Re: [PATCH 4/7] Documentation: git-init: --separate-git-dir: clarify
In reply to Linus ArverQuoted 2 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>---
You would need to work on your justification skills ;-) in the log message. What does this change "clarify" and in what way?
Quoted 25 lines
Documentation/git-init.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Documentation/git-init.txt +6
-6@@ -57,12 +57,12 @@ DIRECTORY" section below.) --separate-git-dir=<git dir>:: -Instead of initializing the repository where it is supposed to be, -place a filesytem-agnostic Git symbolic link there, pointing to the -specified path, and initialize a Git repository at the path. The -result is Git repository can be separated from working tree. If this -is reinitialization, the repository will be moved to the specified -path. +Separate the Git repository from your working tree. Instead of initializing the +repository as a directory to either `$GIT_DIR` or `./.git/`, create a text file +there containing the path to the actual repository. This file acts as +filesystem-agnostic Git symbolic link to the repository. ++ +If this is reinitialization, the repository will be moved to the specified path. --shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
Re: [PATCH 4/7] Documentation: git-init: --separate-git-dir: clarify
Quoted 7 lines · Junio C Hamano
Quoted 2 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>---
You would need to work on your justification skills ;-) in the log message. What does this change "clarify" and in what way?
Oops, sorry. I guess I should have written some more information in the commit message, something like this:
Use shorter sentences to describe what actually happens. We describe what the term "Git symbolic link" actually means.
Also, we separate out the description of the behavioral change upon reinitialization into its own paragraph.
Quoted 25 lines
Quoted 25 lines
Documentation/git-init.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Documentation/git-init.txt +6
-6@@ -57,12 +57,12 @@ DIRECTORY" section below.) --separate-git-dir=<git dir>:: -Instead of initializing the repository where it is supposed to be, -place a filesytem-agnostic Git symbolic link there, pointing to the -specified path, and initialize a Git repository at the path. The -result is Git repository can be separated from working tree. If this -is reinitialization, the repository will be moved to the specified -path. +Separate the Git repository from your working tree. Instead of initializing the +repository as a directory to either `$GIT_DIR` or `./.git/`, create a text file +there containing the path to the actual repository. This file acts as +filesystem-agnostic Git symbolic link to the repository. ++ +If this is reinitialization, the repository will be moved to the specified path. --shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
Re: [PATCH 7/7] Documentation: git-init: flesh out example
In reply to Linus ArverQuoted 10 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>--- Documentation/git-init.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Documentation/git-init.txt +0
-0
Documentation/git-init.txt Start a new Git repository for an existing code base:: · line 141
Quoted 4 lines
Documentation/git-init.txt +1
-0@@ -138,10 +138,12 @@ Start a new Git repository for an existing code base:: $ cd /path/to/my/codebase $ git init <1> $ git add . <2> +$ git commit <3>
I agree it is a good discipline to make the initial "pristine" import immediately after "git add ." without doing anything else. Perhaps the description below wants to make it more explicit?
Quoted 10 lines
Documentation/git-init.txt +3
-2---------------- + -<1> prepare /path/to/my/codebase/.git directory -<2> add all existing file to the index +<1> Create a /path/to/my/codebase/.git directory. +<2> Add all existing files to the index. +<3> Create the first root-commit. GIT ---
Re: [PATCH 7/7] Documentation: git-init: flesh out example
Quoted 7 lines · Junio C Hamano
Quoted 5 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>--- Documentation/git-init.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Quoted 14 lines
Documentation/git-init.txt Start a new Git repository for an existing code base:: · line 141
Quoted 9 lines
Documentation/git-init.txt +1
-0@@ -138,10 +138,12 @@ Start a new Git repository for an existing code base:: $ cd /path/to/my/codebase $ git init <1> $ git add . <2> +$ git commit <3>I agree it is a good discipline to make the initial "pristine" import immediately after "git add ." without doing anything else. Perhaps the description below wants to make it more explicit?
I could add a comment like the following:
For new repositories, creating a commit immediately after "git add ." is good practice as it will cleanly separate any preexisting work (done under some other VCS, for example) from any new work done with git.
Does this make sense? I am not sure how explicit you want it to be, or whether I captured what you wanted to be explained.
Actually, I would like to know if anything is special about the "root-commit" (I only know it is written as such, with a hyphen, because that is what you get from git's output message). I am not sure if this "root-commit" idea is explained in detail in git's other documentation.
Quoted 10 lines
Quoted 10 lines
Documentation/git-init.txt +3
-2---------------- + -<1> prepare /path/to/my/codebase/.git directory -<2> add all existing file to the index +<1> Create a /path/to/my/codebase/.git directory. +<2> Add all existing files to the index. +<3> Create the first root-commit. GIT ---
Re: [PATCH 3/7] Documentation: git-init: template directory: reword
In reply to Linus ArverQuoted 7 lines · Linus Arver
No, the unindenting/removal of blank lines is a non-grammar change and is not necessary, as it doesn't have any effect on the actual output (html/txt/manpage).
I can either keep the same coding style with the rewording, or chop this into two commits, one for the rewording and another for reformatting. Which one do you suggest?
If I were doing this change, I wouldn't touch the formatting, because I did not find that the reformatted version would be any easier to read or maintain compared to the original.
But I suspect that you must have thought the reformatting was a good thing to do for a reason, and I suspected I might have been missing something obvious to you, and that was why I asked. If there is a good reason to reformat, then lets hear it in the commit log message of one of the two patches. Otherwise we can drop the reformatting part.
So my suggestion would be a patch #1 to reword, and optionally another patch #2 to reformat on top, if (and only if) there is a good reason to reformat.
Re: [PATCH 4/7] Documentation: git-init: --separate-git-dir: clarify
In reply to Linus ArverQuoted 9 lines · Linus Arver
Quoted 7 lines · Junio C Hamano
Quoted 2 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>---
You would need to work on your justification skills ;-) in the log message. What does this change "clarify" and in what way?
Quoted 8 lines
Oops, sorry. I guess I should have written some more information in the commit message, something like this:
Use shorter sentences to describe what actually happens. We describe what the term "Git symbolic link" actually means.
Also, we separate out the description of the behavioral change upon reinitialization into its own paragraph.
Sounds very sensible.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Documentation/git-init.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Documentation/git-init.txt +0
-0@@ -57,12 +57,12 @@ DIRECTORY" section below.) --separate-git-dir=<git dir>::
Quoted 10 lines
Quoted 10 lines
Documentation/git-init.txt DIRECTORY" section below.) · line 63
Quoted 10 lines
Documentation/git-init.txt +4
-6-Instead of initializing the repository where it is supposed to be, -place a filesytem-agnostic Git symbolic link there, pointing to the -specified path, and initialize a Git repository at the path. The -result is Git repository can be separated from working tree. If this -is reinitialization, the repository will be moved to the specified -path. +Separate the Git repository from your working tree. Instead of initializing the +repository as a directory to either `$GIT_DIR` or `./.git/`, create a text file +there containing the path to the actual repository. This file acts as +filesystem-agnostic Git symbolic link to the repository.
While I agree that it is a very good idea to state "what it does, what it is for" with the very first sentence of the paragraph, "separate the git repository from your working tree" does not say much more than the name of the option "--separate-git-dir" already tells the reader. And I do not offhand think of a better version (and obviously I didn't think of any when the current text was reviewed and committed). The second sentence in your version is definitely an improvement over the first and the second sentences of the original ("where it is supposed to be" does not give any new information to those who don't know, and does not help those who already know).
Perhaps we can simply remove the first sentence from your version?
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Documentation/git-init.txt +1
-0+If this is reinitialization, the repository will be moved to the specified path. --shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
Re: [PATCH 7/7] Documentation: git-init: flesh out example
In reply to Linus ArverQuoted 25 lines · Linus Arver
Quoted 7 lines · Junio C Hamano
Quoted 5 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>--- Documentation/git-init.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Quoted 14 lines
Documentation/git-init.txt Start a new Git repository for an existing code base:: · line 141
Quoted 9 lines
Documentation/git-init.txt +1
-0@@ -138,10 +138,12 @@ Start a new Git repository for an existing code base:: $ cd /path/to/my/codebase $ git init <1> $ git add . <2> +$ git commit <3>I agree it is a good discipline to make the initial "pristine" import immediately after "git add ." without doing anything else. Perhaps the description below wants to make it more explicit?
I could add a comment like the following:
Quoted 7 lines
For new repositories, creating a commit immediately after "git add ." is good practice as it will cleanly separate any preexisting work (done under some other VCS, for example) from any new work done with git.
Does this make sense? I am not sure how explicit you want it to be, or whether I captured what you wanted to be explained.
I was thinking more along the lines of
<3> Record the pristine state as the first commit in the history.
which should suffice without becoming excessively verbose.
Quoted 2 lines
Actually, I would like to know if anything is special about the "root-commit"...
As far as Git is concerned, they are just ordinary commits without any parents. A commit in Git can have zero or more parents, so from that "structural" point of view, they are not that special.
They are considered special by users because they represent the beginning of the project history.
Re: [PATCH 3/7] Documentation: git-init: template directory: reword
In reply to Junio C HamanoQuoted 14 lines · Junio C Hamano
Quoted 7 lines · Linus Arver
No, the unindenting/removal of blank lines is a non-grammar change and is not necessary, as it doesn't have any effect on the actual output (html/txt/manpage).
I can either keep the same coding style with the rewording, or chop this into two commits, one for the rewording and another for reformatting. Which one do you suggest?
If I were doing this change, I wouldn't touch the formatting, because I did not find that the reformatted version would be any easier to read or maintain compared to the original.
Quoted 6 lines
But I suspect that you must have thought the reformatting was a good thing to do for a reason, and I suspected I might have been missing something obvious to you, and that was why I asked. If there is a good reason to reformat, then lets hear it in the commit log message of one of the two patches. Otherwise we can drop the reformatting part.
And well, considering that the rewording makes the separate items into a single sentence, I thought it would help readability to delete all the whitespace.
In retrospect, I don't think this is a good enough reason to reformat. It was more of a personal writing style judgment call. I am dropping the reformatting part.
Re: [PATCH 4/7] Documentation: git-init: --separate-git-dir: clarify
In reply to Junio C HamanoQuoted 5 lines · Junio C Hamano
While I agree that it is a very good idea to state "what it does, what it is for" with the very first sentence of the paragraph, "separate the git repository from your working tree" does not say much more than the name of the option "--separate-git-dir" already tells the reader.
Ah, I see.
Quoted 7 lines
And I do not offhand think of a better version
(and obviously I didn't think of any when the current text was reviewed and committed). The second sentence in your version is definitely an improvement over the first and the second sentences of the original ("where it is supposed to be" does not give any new information to those who don't know, and does not help those who already know).
OK.
Quoted 1 line
Perhaps we can simply remove the first sentence from your version?
Yes, I agree. I enjoy cutting excess verbiage.
Re: [PATCH 7/7] Documentation: git-init: flesh out example
In reply to Junio C HamanoQuoted 32 lines · Junio C Hamano
Quoted 30 lines · Linus Arver
Quoted 7 lines · Junio C Hamano
Quoted 5 lines · Linus Arver
Signed-off-by Linus Arver <[email protected]>--- Documentation/git-init.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)Quoted 14 lines
Documentation/git-init.txt Start a new Git repository for an existing code base:: · line 141
Quoted 9 lines
Documentation/git-init.txt +1
-0@@ -138,10 +138,12 @@ Start a new Git repository for an existing code base:: $ cd /path/to/my/codebase $ git init <1> $ git add . <2> +$ git commit <3>I agree it is a good discipline to make the initial "pristine" import immediately after "git add ." without doing anything else. Perhaps the description below wants to make it more explicit?
I could add a comment like the following:
For new repositories, creating a commit immediately after "git add ." is good practice as it will cleanly separate any preexisting work (done under some other VCS, for example) from any new work done with git.
Quoted 8 lines
Quoted 2 lines
Does this make sense? I am not sure how explicit you want it to be, or whether I captured what you wanted to be explained.
I was thinking more along the lines of
<3> Record the pristine state as the first commit in the history.
which should suffice without becoming excessively verbose.
Ah yes, I like the brevity.
Quoted 9 lines
Quoted 2 lines
Actually, I would like to know if anything is special about the "root-commit"...
As far as Git is concerned, they are just ordinary commits without any parents. A commit in Git can have zero or more parents, so from that "structural" point of view, they are not that special.
They are considered special by users because they represent the beginning of the project history.
Thank you for the insight. I won't bother adding a blurb about "root-commit" and what it means because they are not that special, as you said so yourself.
PATCH v2 1/1 lots of documentation fixes/rewordings in git-init(1)
In reply to Linus ArverHello,
Aside from the changes stemming from the discussion, I have also separated out some typographical changes from patches 3 and 7, and squashed them into patch
1. So, those commits are cleaner now.
PATCH v2 1/7 Documentation: git-init: typographical fixes
Use backticks when we quote something that the user should literally use.
--- Documentation/git-init.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
Documentation/git-init.txt +5 -6
@@ -43,7 +43,7 @@ OPTIONS -q:: --quiet:: -Only print error and warning messages, all other output will be suppressed. +Only print error and warning messages; all other output will be suppressed. --bare::
@@ -97,7 +97,7 @@ is given: create a repo that is readable and writable to the current user and group, but inaccessible to others. -By default, the configuration flag receive.denyNonFastForwards is enabled +By default, the configuration flag `receive.denyNonFastForwards` is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it.
@@ -106,14 +106,13 @@ line, the command is run inside the directory (possibly after creating it). -- - TEMPLATE DIRECTORY ------------------ The template directory contains files and directories that will be copied to the `$GIT_DIR` after it is created. -The template directory used will (in order): +The template directory used will be (in order): - The argument given with the `--template` option.
@@ -138,8 +137,8 @@ $ git init <1> $ git add . <2> ---------------- + -<1> prepare /path/to/my/codebase/.git directory -<2> add all existing file to the index +<1> Create a /path/to/my/codebase/.git directory. +<2> Add all existing files to the index. GIT ---
Signature · 1 line
2.0.4
PATCH v2 2/7 Documentation: git-init: list items facelift
In reply to Linus ArverNo textual change.
--- Documentation/git-init.txt | 49 ++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 21 deletions(-)
Documentation/git-init.txt +28 -21
@@ -72,30 +72,37 @@ repository. When specified, the config variable "core.sharedRepository" is set so that files and directories under `$GIT_DIR` are created with the requested permissions. When not specified, Git will use permissions reported by umask(2). - ++ The option can have the following values, defaulting to 'group' if no value is given: ++ +-- +'umask' (or 'false'):: + +Use permissions reported by umask(2). The default, when `--shared` is not +specified. + +'group' (or 'true'):: - - 'umask' (or 'false'): Use permissions reported by umask(2). The default, - when `--shared` is not specified. - - - 'group' (or 'true'): Make the repository group-writable, (and g+sx, since - the git group may be not the primary group of all users). - This is used to loosen the permissions of an otherwise safe umask(2) value. - Note that the umask still applies to the other permission bits (e.g. if - umask is '0022', using 'group' will not remove read privileges from other - (non-group) users). See '0xxx' for how to exactly specify the repository - permissions. - - - 'all' (or 'world' or 'everybody'): Same as 'group', but make the repository - readable by all users. - - - '0xxx': '0xxx' is an octal number and each file will have mode '0xxx'. - '0xxx' will override users' umask(2) value (and not only loosen permissions - as 'group' and 'all' does). '0640' will create a repository which is - group-readable, but not group-writable or accessible to others. '0660' will - create a repo that is readable and writable to the current user and group, - but inaccessible to others. +Make the repository group-writable, (and g+sx, since the git group may be not +the primary group of all users). This is used to loosen the permissions of an +otherwise safe umask(2) value. Note that the umask still applies to the other +permission bits (e.g. if umask is '0022', using 'group' will not remove read +privileges from other (non-group) users). See '0xxx' for how to exactly specify +the repository permissions. + +'all' (or 'world' or 'everybody'):: + +Same as 'group', but make the repository readable by all users. + +'0xxx':: + +'0xxx' is an octal number and each file will have mode '0xxx'. '0xxx' will +override users' umask(2) value (and not only loosen permissions as 'group' and +'all' does). '0640' will create a repository which is group-readable, but not +group-writable or accessible to others. '0660' will create a repo that is +readable and writable to the current user and group, but inaccessible to others. +-- By default, the configuration flag `receive.denyNonFastForwards` is enabled in shared repositories, so that you cannot force a non fast-forwarding push
Signature · 1 line
2.0.4
PATCH v2 3/7 Documentation: git-init: template directory: reword
In reply to Linus Arver--- Documentation/git-init.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Documentation/git-init.txt +5 -5
@@ -119,15 +119,15 @@ TEMPLATE DIRECTORY The template directory contains files and directories that will be copied to the `$GIT_DIR` after it is created. -The template directory used will be (in order): +The template directory will be one of the following (in order): - - The argument given with the `--template` option. + - the argument given with the `--template` option; - - The contents of the `$GIT_TEMPLATE_DIR` environment variable. + - the contents of the `$GIT_TEMPLATE_DIR` environment variable; - - The `init.templatedir` configuration variable. + - the `init.templatedir` configuration variable; or - - The default template directory: `/usr/share/git-core/templates`. + - the default template directory: `/usr/share/git-core/templates`. The default template directory includes some directory structure, some suggested "exclude patterns", and copies of sample "hook" files.
Signature · 1 line
2.0.4
PATCH v2 4/7 Documentation: git-init: --separate-git-dir: clarify
In reply to Linus ArverUse shorter sentences to describe what actually happens. We describe what the term "Git symbolic link" actually means.
Also, we separate out the description of the behavioral change upon reinitialization into its own paragraph.
--- Documentation/git-init.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/git-init.txt +6 -6
@@ -57,12 +57,12 @@ DIRECTORY" section below.) --separate-git-dir=<git dir>:: -Instead of initializing the repository where it is supposed to be, -place a filesytem-agnostic Git symbolic link there, pointing to the -specified path, and initialize a Git repository at the path. The -result is Git repository can be separated from working tree. If this -is reinitialization, the repository will be moved to the specified -path. +Instead of initializing the repository as a directory to either `$GIT_DIR` or +`./.git/`, create a text file there containing the path to the actual +repository. This file acts as filesystem-agnostic Git symbolic link to the +repository. ++ +If this is reinitialization, the repository will be moved to the specified path. --shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
Signature · 1 line
2.0.4
PATCH v2 5/7 Documentation: git-init: reword parenthetical statements
In reply to Linus Arver--- Documentation/git-init.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/git-init.txt +2 -2
@@ -108,8 +108,8 @@ By default, the configuration flag `receive.denyNonFastForwards` is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it. -If you name a (possibly non-existent) directory at the end of the command -line, the command is run inside the directory (possibly after creating it). +If you provide a 'directory', the command is run inside it. If this directory +does not exist, it will be created. --
Signature · 1 line
2.0.4
PATCH v2 6/7 Documentation: git-init: template directory: reword and cross-reference
In reply to Linus Arver--- Documentation/git-init.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/git-init.txt +2 -3
@@ -129,9 +129,8 @@ The template directory will be one of the following (in order): - the default template directory: `/usr/share/git-core/templates`. -The default template directory includes some directory structure, some -suggested "exclude patterns", and copies of sample "hook" files. -The suggested patterns and hook files are all modifiable and extensible. +The default template directory includes some directory structure, suggested +"exclude patterns" (see linkgit:gitignore[5]), and sample hook files (see linkgit:githooks[5]). EXAMPLES --------
Signature · 1 line
2.0.4
PATCH v2 7/7 Documentation: git-init: flesh out example
In reply to Linus ArverAdd a third step git commit after adding files for the first time.
--- Documentation/git-init.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/git-init.txt +2 -0
@@ -141,10 +141,12 @@ Start a new Git repository for an existing code base:: $ cd /path/to/my/codebase $ git init <1> $ git add . <2> +$ git commit <3> ---------------- + <1> Create a /path/to/my/codebase/.git directory. <2> Add all existing files to the index. +<3> Record the pristine state as the first commit in the history. GIT ---
Signature · 1 line
2.0.4