git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/4] git-worktree documentation cleanups
@ 2020-08-03  5:36 Eric Sunshine
  2020-08-03  5:36 ` [PATCH 1/4] git-worktree.txt: employ fixed-width typeface consistently Eric Sunshine
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-03  5:36 UTC (permalink / raw)
  To: git; +Cc: Duy Nguyen, Eric Sunshine

This series fixes some problems I ran across in the git-worktree
documentation while working on another worktree-related topic. Since
these fixes are distinct from that topic, I'm submitting them
separately.

Eric Sunshine (4):
  git-worktree.txt: employ fixed-width typeface consistently
  git-worktree.txt: consistently use term "working tree"
  git-worktree.txt: fix minor grammatical issues
  git-worktree.txt: make start of new sentence more obvious

 Documentation/git-worktree.txt | 96 +++++++++++++++++-----------------
 1 file changed, 48 insertions(+), 48 deletions(-)

-- 
2.28.0.236.gb10cc79966


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/4] git-worktree.txt: employ fixed-width typeface consistently
  2020-08-03  5:36 [PATCH 0/4] git-worktree documentation cleanups Eric Sunshine
@ 2020-08-03  5:36 ` Eric Sunshine
  2020-08-03  5:36 ` [PATCH 2/4] git-worktree.txt: consistently use term "working tree" Eric Sunshine
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-03  5:36 UTC (permalink / raw)
  To: git; +Cc: Duy Nguyen, Eric Sunshine

git-worktree documentation generally does a good job of formatting
literal text using a fixed-width typeface, however, some instances of
unformatted literal text have crept in over time. Fix these.

While at it, also fix a few incorrect typefaces resulting from wrong
choice of Asciidoc quotes.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 66 +++++++++++++++++-----------------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 4796c3c05e..810fc8b5e1 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -51,7 +51,7 @@ is linked to the current repository, sharing everything except working
 directory specific files such as HEAD, index, etc. `-` may also be
 specified as `<commit-ish>`; it is synonymous with `@{-1}`.
 +
-If <commit-ish> is a branch name (call it `<branch>`) and is not found,
+If `<commit-ish>` is a branch name (call it `<branch>`) and is not found,
 and neither `-b` nor `-B` nor `--detach` are used, but there does
 exist a tracking branch in exactly one remote (call it `<remote>`)
 with a matching name, treat as equivalent to:
@@ -83,7 +83,7 @@ list::
 List details of each worktree.  The main worktree is listed first, followed by
 each of the linked worktrees.  The output details include if the worktree is
 bare, the revision currently checked out, and the branch currently checked out
-(or 'detached HEAD' if none).
+(or "detached HEAD" if none).
 
 lock::
 
@@ -100,7 +100,7 @@ or linked working trees containing submodules cannot be moved.
 
 prune::
 
-Prune working tree information in $GIT_DIR/worktrees.
+Prune working tree information in `$GIT_DIR/worktrees`.
 
 remove::
 
@@ -128,7 +128,7 @@ OPTIONS
 `move` refuses to move a locked working tree unless `--force` is specified
 twice. If the destination is already assigned to some other working tree but is
 missing (for instance, if `<new-path>` was deleted manually), then `--force`
-allows the move to proceed; use --force twice if the destination is locked.
+allows the move to proceed; use `--force` twice if the destination is locked.
 +
 `remove` refuses to remove an unclean working tree unless `--force` is used.
 To remove a locked working tree, specify `--force` twice.
@@ -203,8 +203,8 @@ This can also be set up as the default behaviour by using the
 +
 If the last path components in the working tree's path is unique among
 working trees, it can be used to identify worktrees. For example if
-you only have two working trees, at "/abc/def/ghi" and "/abc/def/ggg",
-then "ghi" or "def/ghi" is enough to point to the former working tree.
+you only have two working trees, at `/abc/def/ghi` and `/abc/def/ggg`,
+then `ghi` or `def/ghi` is enough to point to the former working tree.
 
 REFS
 ----
@@ -214,24 +214,24 @@ working trees. This section is about the sharing rules and how to access
 refs of one working tree from another.
 
 In general, all pseudo refs are per working tree and all refs starting
-with "refs/" are shared. Pseudo refs are ones like HEAD which are
-directly under GIT_DIR instead of inside GIT_DIR/refs. There is one
-exception to this: refs inside refs/bisect and refs/worktree is not
+with `refs/` are shared. Pseudo refs are ones like HEAD which are
+directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There is one
+exception to this: refs inside `refs/bisect` and `refs/worktree` is not
 shared.
 
 Refs that are per working tree can still be accessed from another
-working tree via two special paths, main-worktree and worktrees. The
+working tree via two special paths, `main-worktree` and `worktrees`. The
 former gives access to per-worktree refs of the main working tree,
 while the latter to all linked working trees.
 
-For example, main-worktree/HEAD or main-worktree/refs/bisect/good
+For example, `main-worktree/HEAD` or `main-worktree/refs/bisect/good`
 resolve to the same value as the main working tree's HEAD and
-refs/bisect/good respectively. Similarly, worktrees/foo/HEAD or
-worktrees/bar/refs/bisect/bad are the same as
-GIT_COMMON_DIR/worktrees/foo/HEAD and
-GIT_COMMON_DIR/worktrees/bar/refs/bisect/bad.
+`refs/bisect/good` respectively. Similarly, `worktrees/foo/HEAD` or
+`worktrees/bar/refs/bisect/bad` are the same as
+`$GIT_COMMON_DIR/worktrees/foo/HEAD` and
+`$GIT_COMMON_DIR/worktrees/bar/refs/bisect/bad`.
 
-To access refs, it's best not to look inside GIT_DIR directly. Instead
+To access refs, it's best not to look inside `$GIT_DIR` directly. Instead
 use commands such as linkgit:git-rev-parse[1] or linkgit:git-update-ref[1]
 which will handle refs correctly.
 
@@ -255,7 +255,7 @@ configuration in this file with `git config --worktree`. Older Git
 versions will refuse to access repositories with this extension.
 
 Note that in this file, the exception for `core.bare` and `core.worktree`
-is gone. If you have them in $GIT_DIR/config before, you must move
+is gone. If you have them in `$GIT_DIR/config` before, you must move
 them to the `config.worktree` of the main working tree. You may also
 take this opportunity to review and move other configuration that you
 do not want to share to all working trees:
@@ -268,7 +268,7 @@ do not want to share to all working trees:
 DETAILS
 -------
 Each linked working tree has a private sub-directory in the repository's
-$GIT_DIR/worktrees directory.  The private sub-directory's name is usually
+`$GIT_DIR/worktrees` directory.  The private sub-directory's name is usually
 the base name of the linked working tree's path, possibly appended with a
 number to make it unique.  For example, when `$GIT_DIR=/path/main/.git` the
 command `git worktree add /path/other/test-next next` creates the linked
@@ -276,51 +276,51 @@ working tree in `/path/other/test-next` and also creates a
 `$GIT_DIR/worktrees/test-next` directory (or `$GIT_DIR/worktrees/test-next1`
 if `test-next` is already taken).
 
-Within a linked working tree, $GIT_DIR is set to point to this private
+Within a linked working tree, `$GIT_DIR` is set to point to this private
 directory (e.g. `/path/main/.git/worktrees/test-next` in the example) and
-$GIT_COMMON_DIR is set to point back to the main working tree's $GIT_DIR
+`$GIT_COMMON_DIR` is set to point back to the main working tree's `$GIT_DIR`
 (e.g. `/path/main/.git`). These settings are made in a `.git` file located at
 the top directory of the linked working tree.
 
 Path resolution via `git rev-parse --git-path` uses either
-$GIT_DIR or $GIT_COMMON_DIR depending on the path. For example, in the
+`$GIT_DIR` or `$GIT_COMMON_DIR` depending on the path. For example, in the
 linked working tree `git rev-parse --git-path HEAD` returns
 `/path/main/.git/worktrees/test-next/HEAD` (not
 `/path/other/test-next/.git/HEAD` or `/path/main/.git/HEAD`) while `git
 rev-parse --git-path refs/heads/master` uses
-$GIT_COMMON_DIR and returns `/path/main/.git/refs/heads/master`,
-since refs are shared across all working trees, except refs/bisect and
-refs/worktree.
+`$GIT_COMMON_DIR` and returns `/path/main/.git/refs/heads/master`,
+since refs are shared across all working trees, except `refs/bisect` and
+`refs/worktree`.
 
 See linkgit:gitrepository-layout[5] for more information. The rule of
 thumb is do not make any assumption about whether a path belongs to
-$GIT_DIR or $GIT_COMMON_DIR when you need to directly access something
-inside $GIT_DIR. Use `git rev-parse --git-path` to get the final path.
+`$GIT_DIR` or `$GIT_COMMON_DIR` when you need to directly access something
+inside `$GIT_DIR`. Use `git rev-parse --git-path` to get the final path.
 
-If you manually move a linked working tree, you need to update the 'gitdir' file
+If you manually move a linked working tree, you need to update the `gitdir` file
 in the entry's directory. For example, if a linked working tree is moved
 to `/newpath/test-next` and its `.git` file points to
 `/path/main/.git/worktrees/test-next`, then update
 `/path/main/.git/worktrees/test-next/gitdir` to reference `/newpath/test-next`
 instead.
 
-To prevent a $GIT_DIR/worktrees entry from being pruned (which
+To prevent a `$GIT_DIR/worktrees` entry from being pruned (which
 can be useful in some situations, such as when the
 entry's working tree is stored on a portable device), use the
 `git worktree lock` command, which adds a file named
-'locked' to the entry's directory. The file contains the reason in
+`locked` to the entry's directory. The file contains the reason in
 plain text. For example, if a linked working tree's `.git` file points
 to `/path/main/.git/worktrees/test-next` then a file named
 `/path/main/.git/worktrees/test-next/locked` will prevent the
 `test-next` entry from being pruned.  See
 linkgit:gitrepository-layout[5] for details.
 
-When extensions.worktreeConfig is enabled, the config file
+When `extensions.worktreeConfig` is enabled, the config file
 `.git/worktrees/<id>/config.worktree` is read after `.git/config` is.
 
 LIST OUTPUT FORMAT
 ------------------
-The worktree list command has two output formats.  The default format shows the
+The `worktree list` command has two output formats. The default format shows the
 details on a single line with columns.  For example:
 
 ------------
@@ -333,8 +333,8 @@ $ git worktree list
 Porcelain Format
 ~~~~~~~~~~~~~~~~
 The porcelain format has a line per attribute.  Attributes are listed with a
-label and value separated by a single space.  Boolean attributes (like 'bare'
-and 'detached') are listed as a label only, and are only present if and only
+label and value separated by a single space.  Boolean attributes (like `bare`
+and `detached`) are listed as a label only, and are only present if and only
 if the value is true.  The first attribute of a worktree is always `worktree`,
 an empty line indicates the end of the record.  For example:
 
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/4] git-worktree.txt: consistently use term "working tree"
  2020-08-03  5:36 [PATCH 0/4] git-worktree documentation cleanups Eric Sunshine
  2020-08-03  5:36 ` [PATCH 1/4] git-worktree.txt: employ fixed-width typeface consistently Eric Sunshine
@ 2020-08-03  5:36 ` Eric Sunshine
  2020-08-03  5:36 ` [PATCH 3/4] git-worktree.txt: fix minor grammatical issues Eric Sunshine
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-03  5:36 UTC (permalink / raw)
  To: git; +Cc: Duy Nguyen, Eric Sunshine

As originally composed, git-worktree.txt employed a mix of "worktree"
and "working tree" which was inconsistent and potentially confusing to
readers. bc483285b7 (Documentation/git-worktree: consistently use term
"linked working tree", 2015-07-20) undertook the task of employing the
term "working tree" consistently throughout the document and avoiding
"worktree" altogether for descriptive text. Since that time, some
instances of "worktree" have crept back in. Continue the work of
bc483285b7 by transforming these to "working tree", as well.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 810fc8b5e1..cd762876f0 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -70,20 +70,20 @@ branches from there if `<branch>` is ambiguous but exists on the
 linkgit:git-config[1].
 +
 If `<commit-ish>` is omitted and neither `-b` nor `-B` nor `--detach` used,
-then, as a convenience, the new worktree is associated with a branch
+then, as a convenience, the new working tree is associated with a branch
 (call it `<branch>`) named after `$(basename <path>)`.  If `<branch>`
 doesn't exist, a new branch based on HEAD is automatically created as
 if `-b <branch>` was given.  If `<branch>` does exist, it will be
-checked out in the new worktree, if it's not checked out anywhere
-else, otherwise the command will refuse to create the worktree (unless
+checked out in the new working tree, if it's not checked out anywhere
+else, otherwise the command will refuse to create the working tree (unless
 `--force` is used).
 
 list::
 
-List details of each worktree.  The main worktree is listed first, followed by
-each of the linked worktrees.  The output details include if the worktree is
-bare, the revision currently checked out, and the branch currently checked out
-(or "detached HEAD" if none).
+List details of each working tree.  The main working tree is listed first,
+followed by each of the linked working trees.  The output details include
+if the working tree is bare, the revision currently checked out, and the
+branch currently checked out (or "detached HEAD" if none).
 
 lock::
 
@@ -202,7 +202,7 @@ This can also be set up as the default behaviour by using the
 	absolute.
 +
 If the last path components in the working tree's path is unique among
-working trees, it can be used to identify worktrees. For example if
+working trees, it can be used to identify working trees. For example if
 you only have two working trees, at `/abc/def/ghi` and `/abc/def/ggg`,
 then `ghi` or `def/ghi` is enough to point to the former working tree.
 
@@ -221,7 +221,7 @@ shared.
 
 Refs that are per working tree can still be accessed from another
 working tree via two special paths, `main-worktree` and `worktrees`. The
-former gives access to per-worktree refs of the main working tree,
+former gives access to per-working tree refs of the main working tree,
 while the latter to all linked working trees.
 
 For example, `main-worktree/HEAD` or `main-worktree/refs/bisect/good`
@@ -335,8 +335,8 @@ Porcelain Format
 The porcelain format has a line per attribute.  Attributes are listed with a
 label and value separated by a single space.  Boolean attributes (like `bare`
 and `detached`) are listed as a label only, and are only present if and only
-if the value is true.  The first attribute of a worktree is always `worktree`,
-an empty line indicates the end of the record.  For example:
+if the value is true.  The first attribute of a working tree is always
+`worktree`, an empty line indicates the end of the record.  For example:
 
 ------------
 $ git worktree list --porcelain
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 3/4] git-worktree.txt: fix minor grammatical issues
  2020-08-03  5:36 [PATCH 0/4] git-worktree documentation cleanups Eric Sunshine
  2020-08-03  5:36 ` [PATCH 1/4] git-worktree.txt: employ fixed-width typeface consistently Eric Sunshine
  2020-08-03  5:36 ` [PATCH 2/4] git-worktree.txt: consistently use term "working tree" Eric Sunshine
@ 2020-08-03  5:36 ` Eric Sunshine
  2020-08-03  5:36 ` [PATCH 4/4] git-worktree.txt: make start of new sentence more obvious Eric Sunshine
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-03  5:36 UTC (permalink / raw)
  To: git; +Cc: Duy Nguyen, Eric Sunshine

Fix a few grammatical problems to improve the reading experience.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index cd762876f0..49422454d1 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -82,7 +82,7 @@ list::
 
 List details of each working tree.  The main working tree is listed first,
 followed by each of the linked working trees.  The output details include
-if the working tree is bare, the revision currently checked out, and the
+whether the working tree is bare, the revision currently checked out, and the
 branch currently checked out (or "detached HEAD" if none).
 
 lock::
@@ -171,7 +171,7 @@ This can also be set up as the default behaviour by using the
 --lock::
 	Keep the working tree locked after creation. This is the
 	equivalent of `git worktree lock` after `git worktree add`,
-	but without race condition.
+	but without a race condition.
 
 -n::
 --dry-run::
@@ -202,21 +202,21 @@ This can also be set up as the default behaviour by using the
 	absolute.
 +
 If the last path components in the working tree's path is unique among
-working trees, it can be used to identify working trees. For example if
+working trees, it can be used to identify a working tree. For example if
 you only have two working trees, at `/abc/def/ghi` and `/abc/def/ggg`,
 then `ghi` or `def/ghi` is enough to point to the former working tree.
 
 REFS
 ----
 In multiple working trees, some refs may be shared between all working
-trees, some refs are local. One example is HEAD is different for all
-working trees. This section is about the sharing rules and how to access
+trees and some refs are local. One example is HEAD which is different for each
+working tree. This section is about the sharing rules and how to access
 refs of one working tree from another.
 
 In general, all pseudo refs are per working tree and all refs starting
 with `refs/` are shared. Pseudo refs are ones like HEAD which are
-directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There is one
-exception to this: refs inside `refs/bisect` and `refs/worktree` is not
+directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There are
+exceptions, however: refs inside `refs/bisect` and `refs/worktree` are not
 shared.
 
 Refs that are per working tree can still be accessed from another
@@ -255,7 +255,7 @@ configuration in this file with `git config --worktree`. Older Git
 versions will refuse to access repositories with this extension.
 
 Note that in this file, the exception for `core.bare` and `core.worktree`
-is gone. If you have them in `$GIT_DIR/config` before, you must move
+is gone. If they exist in `$GIT_DIR/config`, you must move
 them to the `config.worktree` of the main working tree. You may also
 take this opportunity to review and move other configuration that you
 do not want to share to all working trees:
@@ -334,7 +334,7 @@ Porcelain Format
 ~~~~~~~~~~~~~~~~
 The porcelain format has a line per attribute.  Attributes are listed with a
 label and value separated by a single space.  Boolean attributes (like `bare`
-and `detached`) are listed as a label only, and are only present if and only
+and `detached`) are listed as a label only, and are present only
 if the value is true.  The first attribute of a working tree is always
 `worktree`, an empty line indicates the end of the record.  For example:
 
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 4/4] git-worktree.txt: make start of new sentence more obvious
  2020-08-03  5:36 [PATCH 0/4] git-worktree documentation cleanups Eric Sunshine
                   ` (2 preceding siblings ...)
  2020-08-03  5:36 ` [PATCH 3/4] git-worktree.txt: fix minor grammatical issues Eric Sunshine
@ 2020-08-03  5:36 ` Eric Sunshine
  2020-08-03 16:11 ` [PATCH 0/4] git-worktree documentation cleanups Taylor Blau
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-03  5:36 UTC (permalink / raw)
  To: git; +Cc: Duy Nguyen, Eric Sunshine

When reading the rendered description of `add`, it's easy to trip over
and miss the end of one sentence and the start of the next, making it
seem as if they are part of the same statement, separated only by a
dash:

    ... specific files such as HEAD, index, etc. - may also be
    specified as <commit-ish>; it is synonymous with...

This can be particularly confusing since the thoughts expressed by the
two sentences are unrelated. Reduce the likelihood of confusion by
making it obvious that the two sentences are distinct.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 49422454d1..260bfe9105 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -48,8 +48,8 @@ add <path> [<commit-ish>]::
 
 Create `<path>` and checkout `<commit-ish>` into it. The new working directory
 is linked to the current repository, sharing everything except working
-directory specific files such as HEAD, index, etc. `-` may also be
-specified as `<commit-ish>`; it is synonymous with `@{-1}`.
+directory specific files such as HEAD, index, etc. As a convenience,
+`<commit-ish>` may be a bare "`-`", which is synonymous with `@{-1}`.
 +
 If `<commit-ish>` is a branch name (call it `<branch>`) and is not found,
 and neither `-b` nor `-B` nor `--detach` are used, but there does
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/4] git-worktree documentation cleanups
  2020-08-03  5:36 [PATCH 0/4] git-worktree documentation cleanups Eric Sunshine
                   ` (3 preceding siblings ...)
  2020-08-03  5:36 ` [PATCH 4/4] git-worktree.txt: make start of new sentence more obvious Eric Sunshine
@ 2020-08-03 16:11 ` Taylor Blau
  2020-08-03 17:14   ` Junio C Hamano
  2020-08-03 17:57 ` Martin Ågren
  2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
  6 siblings, 1 reply; 20+ messages in thread
From: Taylor Blau @ 2020-08-03 16:11 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: git, Duy Nguyen

Hi Eric,

On Mon, Aug 03, 2020 at 01:36:08AM -0400, Eric Sunshine wrote:
> This series fixes some problems I ran across in the git-worktree
> documentation while working on another worktree-related topic. Since
> these fixes are distinct from that topic, I'm submitting them
> separately.
>
> Eric Sunshine (4):
>   git-worktree.txt: employ fixed-width typeface consistently
>   git-worktree.txt: consistently use term "working tree"
>   git-worktree.txt: fix minor grammatical issues
>   git-worktree.txt: make start of new sentence more obvious
>
>  Documentation/git-worktree.txt | 96 +++++++++++++++++-----------------
>  1 file changed, 48 insertions(+), 48 deletions(-)

All looks good to me. Thanks.

  Reviewed-by: Taylor Blau <me@ttaylorr.com>

> --
> 2.28.0.236.gb10cc79966

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/4] git-worktree documentation cleanups
  2020-08-03 16:11 ` [PATCH 0/4] git-worktree documentation cleanups Taylor Blau
@ 2020-08-03 17:14   ` Junio C Hamano
  0 siblings, 0 replies; 20+ messages in thread
From: Junio C Hamano @ 2020-08-03 17:14 UTC (permalink / raw)
  To: Taylor Blau; +Cc: Eric Sunshine, git, Duy Nguyen

Taylor Blau <me@ttaylorr.com> writes:

> Hi Eric,
>
> On Mon, Aug 03, 2020 at 01:36:08AM -0400, Eric Sunshine wrote:
>> This series fixes some problems I ran across in the git-worktree
>> documentation while working on another worktree-related topic. Since
>> these fixes are distinct from that topic, I'm submitting them
>> separately.
>>
>> Eric Sunshine (4):
>>   git-worktree.txt: employ fixed-width typeface consistently
>>   git-worktree.txt: consistently use term "working tree"
>>   git-worktree.txt: fix minor grammatical issues
>>   git-worktree.txt: make start of new sentence more obvious
>>
>>  Documentation/git-worktree.txt | 96 +++++++++++++++++-----------------
>>  1 file changed, 48 insertions(+), 48 deletions(-)
>
> All looks good to me. Thanks.
>
>   Reviewed-by: Taylor Blau <me@ttaylorr.com>

Yeah, they looked good to me, too.  Thanks, both.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/4] git-worktree documentation cleanups
  2020-08-03  5:36 [PATCH 0/4] git-worktree documentation cleanups Eric Sunshine
                   ` (4 preceding siblings ...)
  2020-08-03 16:11 ` [PATCH 0/4] git-worktree documentation cleanups Taylor Blau
@ 2020-08-03 17:57 ` Martin Ågren
  2020-08-03 23:54   ` Eric Sunshine
  2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
  6 siblings, 1 reply; 20+ messages in thread
From: Martin Ågren @ 2020-08-03 17:57 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: git, Duy Nguyen

On Mon, 3 Aug 2020 at 07:39, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> This series fixes some problems I ran across in the git-worktree
> documentation while working on another worktree-related topic. Since
> these fixes are distinct from that topic, I'm submitting them
> separately.

All of these look correct to me. Thanks for polishing the docs. Extra
thanks for injecting a "$" where we talk about the actual value of an
environment variable.

I offer the following suggestions on top. If you agree with them, or
some of them, you might want to squash them into the various patches.
But it's not like these are critical, I don't think they need to block
this.

Martin

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 260bfe9105..2000a08075 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -25,8 +25,8 @@ Manage multiple working trees attached to the same repository.
 A git repository can support multiple working trees, allowing you to check
 out more than one branch at a time.  With `git worktree add` a new working
 tree is associated with the repository.  This new working tree is called a
-"linked working tree" as opposed to the "main working tree" prepared by "git
-init" or "git clone".  A repository has one main working tree (if it's not a
+"linked working tree" as opposed to the "main working tree" prepared by linkgit:git-init[1]
+or linkgit:git-clone[1].  A repository has one main working tree (if it's not a
 bare repository) and zero or more linked working trees. When you are done
 with a linked working tree, remove it with `git worktree remove`.
 
@@ -48,7 +48,7 @@ add <path> [<commit-ish>]::
 
 Create `<path>` and checkout `<commit-ish>` into it. The new working directory
 is linked to the current repository, sharing everything except working
-directory specific files such as HEAD, index, etc. As a convenience,
+directory specific files such as `HEAD`, `index`, etc. As a convenience,
 `<commit-ish>` may be a bare "`-`", which is synonymous with `@{-1}`.
 +
 If `<commit-ish>` is a branch name (call it `<branch>`) and is not found,
@@ -72,7 +72,7 @@ linkgit:git-config[1].
 If `<commit-ish>` is omitted and neither `-b` nor `-B` nor `--detach` used,
 then, as a convenience, the new working tree is associated with a branch
 (call it `<branch>`) named after `$(basename <path>)`.  If `<branch>`
-doesn't exist, a new branch based on HEAD is automatically created as
+doesn't exist, a new branch based on `HEAD` is automatically created as
 if `-b <branch>` was given.  If `<branch>` does exist, it will be
 checked out in the new working tree, if it's not checked out anywhere
 else, otherwise the command will refuse to create the working tree (unless
@@ -137,13 +137,13 @@ To remove a locked working tree, specify `--force` twice.
 -B <new-branch>::
 	With `add`, create a new branch named `<new-branch>` starting at
 	`<commit-ish>`, and check out `<new-branch>` into the new working tree.
-	If `<commit-ish>` is omitted, it defaults to HEAD.
+	If `<commit-ish>` is omitted, it defaults to `HEAD`.
 	By default, `-b` refuses to create a new branch if it already
 	exists. `-B` overrides this safeguard, resetting `<new-branch>` to
 	`<commit-ish>`.
 
 --detach::
-	With `add`, detach HEAD in the new working tree. See "DETACHED HEAD"
+	With `add`, detach `HEAD` in the new working tree. See "DETACHED HEAD"
 	in linkgit:git-checkout[1].
 
 --[no-]checkout::
@@ -154,7 +154,7 @@ To remove a locked working tree, specify `--force` twice.
 
 --[no-]guess-remote::
 	With `worktree add <path>`, without `<commit-ish>`, instead
-	of creating a new branch from HEAD, if there exists a tracking
+	of creating a new branch from `HEAD`, if there exists a tracking
 	branch in exactly one remote matching the basename of `<path>`,
 	base the new branch on the remote-tracking branch, and mark
 	the remote-tracking branch as "upstream" from the new branch.
@@ -166,7 +166,7 @@ This can also be set up as the default behaviour by using the
 	When creating a new branch, if `<commit-ish>` is a branch,
 	mark it as "upstream" from the new branch.  This is the
 	default if `<commit-ish>` is a remote-tracking branch.  See
-	"--track" in linkgit:git-branch[1] for details.
+	`--track` in linkgit:git-branch[1] for details.
 
 --lock::
 	Keep the working tree locked after creation. This is the
@@ -185,14 +185,14 @@ This can also be set up as the default behaviour by using the
 
 -q::
 --quiet::
-	With 'add', suppress feedback messages.
+	With `add`, suppress feedback messages.
 
 -v::
 --verbose::
 	With `prune`, report all removals.
 
 --expire <time>::
-	With `prune`, only expire unused working trees older than <time>.
+	With `prune`, only expire unused working trees older than `<time>`.
 
 --reason <string>::
 	With `lock`, an explanation why the working tree is locked.
@@ -209,12 +209,12 @@ then `ghi` or `def/ghi` is enough to point to the former working tree.
 REFS
 ----
 In multiple working trees, some refs may be shared between all working
-trees and some refs are local. One example is HEAD which is different for each
+trees and some refs are local. One example is `HEAD` which is different for each
 working tree. This section is about the sharing rules and how to access
 refs of one working tree from another.
 
 In general, all pseudo refs are per working tree and all refs starting
-with `refs/` are shared. Pseudo refs are ones like HEAD which are
+with `refs/` are shared. Pseudo refs are ones like `HEAD` which are
 directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There are
 exceptions, however: refs inside `refs/bisect` and `refs/worktree` are not
 shared.
@@ -225,7 +225,7 @@ former gives access to per-working tree refs of the main working tree,
 while the latter to all linked working trees.
 
 For example, `main-worktree/HEAD` or `main-worktree/refs/bisect/good`
-resolve to the same value as the main working tree's HEAD and
+resolve to the same value as the main working tree's `HEAD` and
 `refs/bisect/good` respectively. Similarly, `worktrees/foo/HEAD` or
 `worktrees/bar/refs/bisect/bad` are the same as
 `$GIT_COMMON_DIR/worktrees/foo/HEAD` and
@@ -243,7 +243,7 @@ already present in the config file, they will be applied to the main
 working trees only.
 
 In order to have configuration specific to working trees, you can turn
-on "worktreeConfig" extension, e.g.:
+on the "worktreeConfig" extension, e.g.:
 
 ------------
 $ git config extensions.worktreeConfig true
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/4] git-worktree documentation cleanups
  2020-08-03 17:57 ` Martin Ågren
@ 2020-08-03 23:54   ` Eric Sunshine
  2020-08-04  0:15     ` Junio C Hamano
  0 siblings, 1 reply; 20+ messages in thread
From: Eric Sunshine @ 2020-08-03 23:54 UTC (permalink / raw)
  To: Martin Ågren; +Cc: Git List, Duy Nguyen

On Mon, Aug 3, 2020 at 1:57 PM Martin Ågren <martin.agren@gmail.com> wrote:
> I offer the following suggestions on top. If you agree with them, or
> some of them, you might want to squash them into the various patches.

Thanks for the review and suggestions for additional changes. See a
few minor comments below...

> -"linked working tree" as opposed to the "main working tree" prepared by "git
> -init" or "git clone".  A repository has one main working tree (if it's not a
> +"linked working tree" as opposed to the "main working tree" prepared by linkgit:git-init[1]
> +or linkgit:git-clone[1].  A repository has one main working tree (if it's not a

Good idea, though this could just go atop this series.

> -directory specific files such as HEAD, index, etc. As a convenience,
> +directory specific files such as `HEAD`, `index`, etc. As a convenience,

I intentionally left HEAD as-is because it consistently lacks quotes
in this document, and I didn't feel strongly about it being quoted or
not. Such a change could easily go atop this series.

I did see and consider adding backticks around "index" here but
likewise didn't feel strongly about it at the time. But upon
reconsideration, as a literal filename, you're right that it ought to
be typeset specially.

> @@ -166,7 +166,7 @@ This can also be set up as the default behaviour by using the
> -       "--track" in linkgit:git-branch[1] for details.
> +       `--track` in linkgit:git-branch[1] for details.

I missed this one.

> -       With 'add', suppress feedback messages.
> +       With `add`, suppress feedback messages.

And this.

> -       With `prune`, only expire unused working trees older than <time>.
> +       With `prune`, only expire unused working trees older than `<time>`.

Ditto.

> -on "worktreeConfig" extension, e.g.:
> +on the "worktreeConfig" extension, e.g.:

In addition to the grammo you spotted, the quotes around
worktreeConfig should be backticks.

I'll think go ahead and re-roll, adding a couple new patches,
respectively, for the linkgit:'s you pointed out and typesetting
`HEAD` specially.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/4] git-worktree documentation cleanups
  2020-08-03 23:54   ` Eric Sunshine
@ 2020-08-04  0:15     ` Junio C Hamano
  0 siblings, 0 replies; 20+ messages in thread
From: Junio C Hamano @ 2020-08-04  0:15 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Martin Ågren, Git List, Duy Nguyen

Eric Sunshine <sunshine@sunshineco.com> writes:

> In addition to the grammo you spotted, the quotes around
> worktreeConfig should be backticks.
>
> I'll think go ahead and re-roll, adding a couple new patches,
> respectively, for the linkgit:'s you pointed out and typesetting
> `HEAD` specially.

Sounds all sensible.

Thanks, all.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH v2 0/5] git-worktree documentation cleanups
  2020-08-03  5:36 [PATCH 0/4] git-worktree documentation cleanups Eric Sunshine
                   ` (5 preceding siblings ...)
  2020-08-03 17:57 ` Martin Ågren
@ 2020-08-04  0:55 ` Eric Sunshine
  2020-08-04  0:55   ` [PATCH v2 1/5] git-worktree.txt: employ fixed-width typeface consistently Eric Sunshine
                     ` (6 more replies)
  6 siblings, 7 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-04  0:55 UTC (permalink / raw)
  To: git
  Cc: Duy Nguyen, Junio C Hamano, Taylor Blau, Martin Ågren,
	Eric Sunshine

This is a re-roll of [1] which fixes some problems I ran across in the
git-worktree documentation while working on another worktree-related
topic.

This version adds some `linkgit:` invocations, typesets `HEAD` as
fixed-width, and covers a few additional places where backticks should
have been applied in place of other quotes, as suggested by Martin[2],
as well as a few more I noticed beyond those found by him. Although I
had planned on adding backticks around `HEAD` in a separate patch, I
ended up folding that change into patch 1 since there are relatively few
such instances, and since, upon reflection, such a change didn't seem to
warrant its own patch.

I omitted Taylor's Reviewed-by:[4] since the patches have changed since
he reviewed them, but he's welcome to give it again.

[1]: https://lore.kernel.org/git/20200803053612.50095-1-sunshine@sunshineco.com/
[2]: https://lore.kernel.org/git/20200803175717.7465-1-martin.agren@gmail.com/
[3]: https://lore.kernel.org/git/CAPig+cQtcxqQDAQ5bO6ica+Z7dd2+r8B+kXm0RK7qhpsAiX_xg@mail.gmail.com/
[4]: https://lore.kernel.org/git/20200803161102.GB50799@syl.lan/

Eric Sunshine (5):
  git-worktree.txt: employ fixed-width typeface consistently
  git-worktree.txt: consistently use term "working tree"
  git-worktree.txt: fix minor grammatical issues
  git-worktree.txt: make start of new sentence more obvious
  git-wortkree.txt: link to man pages when citing other Git commands

 Documentation/git-worktree.txt | 123 +++++++++++++++++----------------
 1 file changed, 62 insertions(+), 61 deletions(-)

Interdiff against v1:
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 260bfe9105..6ee6ec7982 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -25,8 +25,9 @@ Manage multiple working trees attached to the same repository.
 A git repository can support multiple working trees, allowing you to check
 out more than one branch at a time.  With `git worktree add` a new working
 tree is associated with the repository.  This new working tree is called a
-"linked working tree" as opposed to the "main working tree" prepared by "git
-init" or "git clone".  A repository has one main working tree (if it's not a
+"linked working tree" as opposed to the "main working tree" prepared by
+linkgit:git-init[1] or linkgit:git-clone[1].
+A repository has one main working tree (if it's not a
 bare repository) and zero or more linked working trees. When you are done
 with a linked working tree, remove it with `git worktree remove`.
 
@@ -48,7 +49,7 @@ add <path> [<commit-ish>]::
 
 Create `<path>` and checkout `<commit-ish>` into it. The new working directory
 is linked to the current repository, sharing everything except working
-directory specific files such as HEAD, index, etc. As a convenience,
+directory specific files such as `HEAD`, `index`, etc. As a convenience,
 `<commit-ish>` may be a bare "`-`", which is synonymous with `@{-1}`.
 +
 If `<commit-ish>` is a branch name (call it `<branch>`) and is not found,
@@ -66,13 +67,13 @@ one for the purposes of disambiguation, even if the `<branch>` isn't
 unique across all remotes. Set it to
 e.g. `checkout.defaultRemote=origin` to always checkout remote
 branches from there if `<branch>` is ambiguous but exists on the
-'origin' remote. See also `checkout.defaultRemote` in
+`origin` remote. See also `checkout.defaultRemote` in
 linkgit:git-config[1].
 +
 If `<commit-ish>` is omitted and neither `-b` nor `-B` nor `--detach` used,
 then, as a convenience, the new working tree is associated with a branch
 (call it `<branch>`) named after `$(basename <path>)`.  If `<branch>`
-doesn't exist, a new branch based on HEAD is automatically created as
+doesn't exist, a new branch based on `HEAD` is automatically created as
 if `-b <branch>` was given.  If `<branch>` does exist, it will be
 checked out in the new working tree, if it's not checked out anywhere
 else, otherwise the command will refuse to create the working tree (unless
@@ -137,13 +138,13 @@ To remove a locked working tree, specify `--force` twice.
 -B <new-branch>::
 	With `add`, create a new branch named `<new-branch>` starting at
 	`<commit-ish>`, and check out `<new-branch>` into the new working tree.
-	If `<commit-ish>` is omitted, it defaults to HEAD.
+	If `<commit-ish>` is omitted, it defaults to `HEAD`.
 	By default, `-b` refuses to create a new branch if it already
 	exists. `-B` overrides this safeguard, resetting `<new-branch>` to
 	`<commit-ish>`.
 
 --detach::
-	With `add`, detach HEAD in the new working tree. See "DETACHED HEAD"
+	With `add`, detach `HEAD` in the new working tree. See "DETACHED HEAD"
 	in linkgit:git-checkout[1].
 
 --[no-]checkout::
@@ -154,7 +155,7 @@ To remove a locked working tree, specify `--force` twice.
 
 --[no-]guess-remote::
 	With `worktree add <path>`, without `<commit-ish>`, instead
-	of creating a new branch from HEAD, if there exists a tracking
+	of creating a new branch from `HEAD`, if there exists a tracking
 	branch in exactly one remote matching the basename of `<path>`,
 	base the new branch on the remote-tracking branch, and mark
 	the remote-tracking branch as "upstream" from the new branch.
@@ -166,7 +167,7 @@ This can also be set up as the default behaviour by using the
 	When creating a new branch, if `<commit-ish>` is a branch,
 	mark it as "upstream" from the new branch.  This is the
 	default if `<commit-ish>` is a remote-tracking branch.  See
-	"--track" in linkgit:git-branch[1] for details.
+	`--track` in linkgit:git-branch[1] for details.
 
 --lock::
 	Keep the working tree locked after creation. This is the
@@ -185,14 +186,14 @@ This can also be set up as the default behaviour by using the
 
 -q::
 --quiet::
-	With 'add', suppress feedback messages.
+	With `add`, suppress feedback messages.
 
 -v::
 --verbose::
 	With `prune`, report all removals.
 
 --expire <time>::
-	With `prune`, only expire unused working trees older than <time>.
+	With `prune`, only expire unused working trees older than `<time>`.
 
 --reason <string>::
 	With `lock`, an explanation why the working tree is locked.
@@ -209,12 +210,12 @@ then `ghi` or `def/ghi` is enough to point to the former working tree.
 REFS
 ----
 In multiple working trees, some refs may be shared between all working
-trees and some refs are local. One example is HEAD which is different for each
+trees and some refs are local. One example is `HEAD` which is different for each
 working tree. This section is about the sharing rules and how to access
 refs of one working tree from another.
 
 In general, all pseudo refs are per working tree and all refs starting
-with `refs/` are shared. Pseudo refs are ones like HEAD which are
+with `refs/` are shared. Pseudo refs are ones like `HEAD` which are
 directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There are
 exceptions, however: refs inside `refs/bisect` and `refs/worktree` are not
 shared.
@@ -225,7 +226,7 @@ former gives access to per-working tree refs of the main working tree,
 while the latter to all linked working trees.
 
 For example, `main-worktree/HEAD` or `main-worktree/refs/bisect/good`
-resolve to the same value as the main working tree's HEAD and
+resolve to the same value as the main working tree's `HEAD` and
 `refs/bisect/good` respectively. Similarly, `worktrees/foo/HEAD` or
 `worktrees/bar/refs/bisect/bad` are the same as
 `$GIT_COMMON_DIR/worktrees/foo/HEAD` and
@@ -237,13 +238,13 @@ which will handle refs correctly.
 
 CONFIGURATION FILE
 ------------------
-By default, the repository "config" file is shared across all working
+By default, the repository `config` file is shared across all working
 trees. If the config variables `core.bare` or `core.worktree` are
 already present in the config file, they will be applied to the main
 working trees only.
 
 In order to have configuration specific to working trees, you can turn
-on "worktreeConfig" extension, e.g.:
+on the `worktreeConfig` extension, e.g.:
 
 ------------
 $ git config extensions.worktreeConfig true
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 1/5] git-worktree.txt: employ fixed-width typeface consistently
  2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
@ 2020-08-04  0:55   ` Eric Sunshine
  2020-08-04  0:55   ` [PATCH v2 2/5] git-worktree.txt: consistently use term "working tree" Eric Sunshine
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-04  0:55 UTC (permalink / raw)
  To: git
  Cc: Duy Nguyen, Junio C Hamano, Taylor Blau, Martin Ågren,
	Eric Sunshine

git-worktree documentation generally does a good job of formatting
literal text using a fixed-width typeface, however, some instances of
unformatted literal text have crept in over time. Fix these.

While at it, also fix a few incorrect typefaces resulting from wrong
choice of Asciidoc quotes.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 96 +++++++++++++++++-----------------
 1 file changed, 48 insertions(+), 48 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 4796c3c05e..f7c1bd34f8 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -25,8 +25,8 @@ Manage multiple working trees attached to the same repository.
 A git repository can support multiple working trees, allowing you to check
 out more than one branch at a time.  With `git worktree add` a new working
 tree is associated with the repository.  This new working tree is called a
-"linked working tree" as opposed to the "main working tree" prepared by "git
-init" or "git clone".  A repository has one main working tree (if it's not a
+"linked working tree" as opposed to the "main working tree" prepared by `git
+init` or `git clone`.  A repository has one main working tree (if it's not a
 bare repository) and zero or more linked working trees. When you are done
 with a linked working tree, remove it with `git worktree remove`.
 
@@ -48,10 +48,10 @@ add <path> [<commit-ish>]::
 
 Create `<path>` and checkout `<commit-ish>` into it. The new working directory
 is linked to the current repository, sharing everything except working
-directory specific files such as HEAD, index, etc. `-` may also be
+directory specific files such as `HEAD`, `index`, etc. `-` may also be
 specified as `<commit-ish>`; it is synonymous with `@{-1}`.
 +
-If <commit-ish> is a branch name (call it `<branch>`) and is not found,
+If `<commit-ish>` is a branch name (call it `<branch>`) and is not found,
 and neither `-b` nor `-B` nor `--detach` are used, but there does
 exist a tracking branch in exactly one remote (call it `<remote>`)
 with a matching name, treat as equivalent to:
@@ -66,13 +66,13 @@ one for the purposes of disambiguation, even if the `<branch>` isn't
 unique across all remotes. Set it to
 e.g. `checkout.defaultRemote=origin` to always checkout remote
 branches from there if `<branch>` is ambiguous but exists on the
-'origin' remote. See also `checkout.defaultRemote` in
+`origin` remote. See also `checkout.defaultRemote` in
 linkgit:git-config[1].
 +
 If `<commit-ish>` is omitted and neither `-b` nor `-B` nor `--detach` used,
 then, as a convenience, the new worktree is associated with a branch
 (call it `<branch>`) named after `$(basename <path>)`.  If `<branch>`
-doesn't exist, a new branch based on HEAD is automatically created as
+doesn't exist, a new branch based on `HEAD` is automatically created as
 if `-b <branch>` was given.  If `<branch>` does exist, it will be
 checked out in the new worktree, if it's not checked out anywhere
 else, otherwise the command will refuse to create the worktree (unless
@@ -83,7 +83,7 @@ list::
 List details of each worktree.  The main worktree is listed first, followed by
 each of the linked worktrees.  The output details include if the worktree is
 bare, the revision currently checked out, and the branch currently checked out
-(or 'detached HEAD' if none).
+(or "detached HEAD" if none).
 
 lock::
 
@@ -100,7 +100,7 @@ or linked working trees containing submodules cannot be moved.
 
 prune::
 
-Prune working tree information in $GIT_DIR/worktrees.
+Prune working tree information in `$GIT_DIR/worktrees`.
 
 remove::
 
@@ -128,7 +128,7 @@ OPTIONS
 `move` refuses to move a locked working tree unless `--force` is specified
 twice. If the destination is already assigned to some other working tree but is
 missing (for instance, if `<new-path>` was deleted manually), then `--force`
-allows the move to proceed; use --force twice if the destination is locked.
+allows the move to proceed; use `--force` twice if the destination is locked.
 +
 `remove` refuses to remove an unclean working tree unless `--force` is used.
 To remove a locked working tree, specify `--force` twice.
@@ -137,13 +137,13 @@ To remove a locked working tree, specify `--force` twice.
 -B <new-branch>::
 	With `add`, create a new branch named `<new-branch>` starting at
 	`<commit-ish>`, and check out `<new-branch>` into the new working tree.
-	If `<commit-ish>` is omitted, it defaults to HEAD.
+	If `<commit-ish>` is omitted, it defaults to `HEAD`.
 	By default, `-b` refuses to create a new branch if it already
 	exists. `-B` overrides this safeguard, resetting `<new-branch>` to
 	`<commit-ish>`.
 
 --detach::
-	With `add`, detach HEAD in the new working tree. See "DETACHED HEAD"
+	With `add`, detach `HEAD` in the new working tree. See "DETACHED HEAD"
 	in linkgit:git-checkout[1].
 
 --[no-]checkout::
@@ -154,7 +154,7 @@ To remove a locked working tree, specify `--force` twice.
 
 --[no-]guess-remote::
 	With `worktree add <path>`, without `<commit-ish>`, instead
-	of creating a new branch from HEAD, if there exists a tracking
+	of creating a new branch from `HEAD`, if there exists a tracking
 	branch in exactly one remote matching the basename of `<path>`,
 	base the new branch on the remote-tracking branch, and mark
 	the remote-tracking branch as "upstream" from the new branch.
@@ -166,7 +166,7 @@ This can also be set up as the default behaviour by using the
 	When creating a new branch, if `<commit-ish>` is a branch,
 	mark it as "upstream" from the new branch.  This is the
 	default if `<commit-ish>` is a remote-tracking branch.  See
-	"--track" in linkgit:git-branch[1] for details.
+	`--track` in linkgit:git-branch[1] for details.
 
 --lock::
 	Keep the working tree locked after creation. This is the
@@ -185,14 +185,14 @@ This can also be set up as the default behaviour by using the
 
 -q::
 --quiet::
-	With 'add', suppress feedback messages.
+	With `add`, suppress feedback messages.
 
 -v::
 --verbose::
 	With `prune`, report all removals.
 
 --expire <time>::
-	With `prune`, only expire unused working trees older than <time>.
+	With `prune`, only expire unused working trees older than `<time>`.
 
 --reason <string>::
 	With `lock`, an explanation why the working tree is locked.
@@ -203,47 +203,47 @@ This can also be set up as the default behaviour by using the
 +
 If the last path components in the working tree's path is unique among
 working trees, it can be used to identify worktrees. For example if
-you only have two working trees, at "/abc/def/ghi" and "/abc/def/ggg",
-then "ghi" or "def/ghi" is enough to point to the former working tree.
+you only have two working trees, at `/abc/def/ghi` and `/abc/def/ggg`,
+then `ghi` or `def/ghi` is enough to point to the former working tree.
 
 REFS
 ----
 In multiple working trees, some refs may be shared between all working
-trees, some refs are local. One example is HEAD is different for all
+trees, some refs are local. One example is `HEAD` is different for all
 working trees. This section is about the sharing rules and how to access
 refs of one working tree from another.
 
 In general, all pseudo refs are per working tree and all refs starting
-with "refs/" are shared. Pseudo refs are ones like HEAD which are
-directly under GIT_DIR instead of inside GIT_DIR/refs. There is one
-exception to this: refs inside refs/bisect and refs/worktree is not
+with `refs/` are shared. Pseudo refs are ones like `HEAD` which are
+directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There is one
+exception to this: refs inside `refs/bisect` and `refs/worktree` is not
 shared.
 
 Refs that are per working tree can still be accessed from another
-working tree via two special paths, main-worktree and worktrees. The
+working tree via two special paths, `main-worktree` and `worktrees`. The
 former gives access to per-worktree refs of the main working tree,
 while the latter to all linked working trees.
 
-For example, main-worktree/HEAD or main-worktree/refs/bisect/good
-resolve to the same value as the main working tree's HEAD and
-refs/bisect/good respectively. Similarly, worktrees/foo/HEAD or
-worktrees/bar/refs/bisect/bad are the same as
-GIT_COMMON_DIR/worktrees/foo/HEAD and
-GIT_COMMON_DIR/worktrees/bar/refs/bisect/bad.
+For example, `main-worktree/HEAD` or `main-worktree/refs/bisect/good`
+resolve to the same value as the main working tree's `HEAD` and
+`refs/bisect/good` respectively. Similarly, `worktrees/foo/HEAD` or
+`worktrees/bar/refs/bisect/bad` are the same as
+`$GIT_COMMON_DIR/worktrees/foo/HEAD` and
+`$GIT_COMMON_DIR/worktrees/bar/refs/bisect/bad`.
 
-To access refs, it's best not to look inside GIT_DIR directly. Instead
+To access refs, it's best not to look inside `$GIT_DIR` directly. Instead
 use commands such as linkgit:git-rev-parse[1] or linkgit:git-update-ref[1]
 which will handle refs correctly.
 
 CONFIGURATION FILE
 ------------------
-By default, the repository "config" file is shared across all working
+By default, the repository `config` file is shared across all working
 trees. If the config variables `core.bare` or `core.worktree` are
 already present in the config file, they will be applied to the main
 working trees only.
 
 In order to have configuration specific to working trees, you can turn
-on "worktreeConfig" extension, e.g.:
+on `worktreeConfig` extension, e.g.:
 
 ------------
 $ git config extensions.worktreeConfig true
@@ -255,7 +255,7 @@ configuration in this file with `git config --worktree`. Older Git
 versions will refuse to access repositories with this extension.
 
 Note that in this file, the exception for `core.bare` and `core.worktree`
-is gone. If you have them in $GIT_DIR/config before, you must move
+is gone. If you have them in `$GIT_DIR/config` before, you must move
 them to the `config.worktree` of the main working tree. You may also
 take this opportunity to review and move other configuration that you
 do not want to share to all working trees:
@@ -268,7 +268,7 @@ do not want to share to all working trees:
 DETAILS
 -------
 Each linked working tree has a private sub-directory in the repository's
-$GIT_DIR/worktrees directory.  The private sub-directory's name is usually
+`$GIT_DIR/worktrees` directory.  The private sub-directory's name is usually
 the base name of the linked working tree's path, possibly appended with a
 number to make it unique.  For example, when `$GIT_DIR=/path/main/.git` the
 command `git worktree add /path/other/test-next next` creates the linked
@@ -276,51 +276,51 @@ working tree in `/path/other/test-next` and also creates a
 `$GIT_DIR/worktrees/test-next` directory (or `$GIT_DIR/worktrees/test-next1`
 if `test-next` is already taken).
 
-Within a linked working tree, $GIT_DIR is set to point to this private
+Within a linked working tree, `$GIT_DIR` is set to point to this private
 directory (e.g. `/path/main/.git/worktrees/test-next` in the example) and
-$GIT_COMMON_DIR is set to point back to the main working tree's $GIT_DIR
+`$GIT_COMMON_DIR` is set to point back to the main working tree's `$GIT_DIR`
 (e.g. `/path/main/.git`). These settings are made in a `.git` file located at
 the top directory of the linked working tree.
 
 Path resolution via `git rev-parse --git-path` uses either
-$GIT_DIR or $GIT_COMMON_DIR depending on the path. For example, in the
+`$GIT_DIR` or `$GIT_COMMON_DIR` depending on the path. For example, in the
 linked working tree `git rev-parse --git-path HEAD` returns
 `/path/main/.git/worktrees/test-next/HEAD` (not
 `/path/other/test-next/.git/HEAD` or `/path/main/.git/HEAD`) while `git
 rev-parse --git-path refs/heads/master` uses
-$GIT_COMMON_DIR and returns `/path/main/.git/refs/heads/master`,
-since refs are shared across all working trees, except refs/bisect and
-refs/worktree.
+`$GIT_COMMON_DIR` and returns `/path/main/.git/refs/heads/master`,
+since refs are shared across all working trees, except `refs/bisect` and
+`refs/worktree`.
 
 See linkgit:gitrepository-layout[5] for more information. The rule of
 thumb is do not make any assumption about whether a path belongs to
-$GIT_DIR or $GIT_COMMON_DIR when you need to directly access something
-inside $GIT_DIR. Use `git rev-parse --git-path` to get the final path.
+`$GIT_DIR` or `$GIT_COMMON_DIR` when you need to directly access something
+inside `$GIT_DIR`. Use `git rev-parse --git-path` to get the final path.
 
-If you manually move a linked working tree, you need to update the 'gitdir' file
+If you manually move a linked working tree, you need to update the `gitdir` file
 in the entry's directory. For example, if a linked working tree is moved
 to `/newpath/test-next` and its `.git` file points to
 `/path/main/.git/worktrees/test-next`, then update
 `/path/main/.git/worktrees/test-next/gitdir` to reference `/newpath/test-next`
 instead.
 
-To prevent a $GIT_DIR/worktrees entry from being pruned (which
+To prevent a `$GIT_DIR/worktrees` entry from being pruned (which
 can be useful in some situations, such as when the
 entry's working tree is stored on a portable device), use the
 `git worktree lock` command, which adds a file named
-'locked' to the entry's directory. The file contains the reason in
+`locked` to the entry's directory. The file contains the reason in
 plain text. For example, if a linked working tree's `.git` file points
 to `/path/main/.git/worktrees/test-next` then a file named
 `/path/main/.git/worktrees/test-next/locked` will prevent the
 `test-next` entry from being pruned.  See
 linkgit:gitrepository-layout[5] for details.
 
-When extensions.worktreeConfig is enabled, the config file
+When `extensions.worktreeConfig` is enabled, the config file
 `.git/worktrees/<id>/config.worktree` is read after `.git/config` is.
 
 LIST OUTPUT FORMAT
 ------------------
-The worktree list command has two output formats.  The default format shows the
+The `worktree list` command has two output formats. The default format shows the
 details on a single line with columns.  For example:
 
 ------------
@@ -333,8 +333,8 @@ $ git worktree list
 Porcelain Format
 ~~~~~~~~~~~~~~~~
 The porcelain format has a line per attribute.  Attributes are listed with a
-label and value separated by a single space.  Boolean attributes (like 'bare'
-and 'detached') are listed as a label only, and are only present if and only
+label and value separated by a single space.  Boolean attributes (like `bare`
+and `detached`) are listed as a label only, and are only present if and only
 if the value is true.  The first attribute of a worktree is always `worktree`,
 an empty line indicates the end of the record.  For example:
 
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 2/5] git-worktree.txt: consistently use term "working tree"
  2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
  2020-08-04  0:55   ` [PATCH v2 1/5] git-worktree.txt: employ fixed-width typeface consistently Eric Sunshine
@ 2020-08-04  0:55   ` Eric Sunshine
  2020-08-04  0:55   ` [PATCH v2 3/5] git-worktree.txt: fix minor grammatical issues Eric Sunshine
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-04  0:55 UTC (permalink / raw)
  To: git
  Cc: Duy Nguyen, Junio C Hamano, Taylor Blau, Martin Ågren,
	Eric Sunshine

As originally composed, git-worktree.txt employed a mix of "worktree"
and "working tree" which was inconsistent and potentially confusing to
readers. bc483285b7 (Documentation/git-worktree: consistently use term
"linked working tree", 2015-07-20) undertook the task of employing the
term "working tree" consistently throughout the document and avoiding
"worktree" altogether for descriptive text. Since that time, some
instances of "worktree" have crept back in. Continue the work of
bc483285b7 by transforming these to "working tree", as well.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index f7c1bd34f8..926f4662ee 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -70,20 +70,20 @@ branches from there if `<branch>` is ambiguous but exists on the
 linkgit:git-config[1].
 +
 If `<commit-ish>` is omitted and neither `-b` nor `-B` nor `--detach` used,
-then, as a convenience, the new worktree is associated with a branch
+then, as a convenience, the new working tree is associated with a branch
 (call it `<branch>`) named after `$(basename <path>)`.  If `<branch>`
 doesn't exist, a new branch based on `HEAD` is automatically created as
 if `-b <branch>` was given.  If `<branch>` does exist, it will be
-checked out in the new worktree, if it's not checked out anywhere
-else, otherwise the command will refuse to create the worktree (unless
+checked out in the new working tree, if it's not checked out anywhere
+else, otherwise the command will refuse to create the working tree (unless
 `--force` is used).
 
 list::
 
-List details of each worktree.  The main worktree is listed first, followed by
-each of the linked worktrees.  The output details include if the worktree is
-bare, the revision currently checked out, and the branch currently checked out
-(or "detached HEAD" if none).
+List details of each working tree.  The main working tree is listed first,
+followed by each of the linked working trees.  The output details include
+if the working tree is bare, the revision currently checked out, and the
+branch currently checked out (or "detached HEAD" if none).
 
 lock::
 
@@ -202,7 +202,7 @@ This can also be set up as the default behaviour by using the
 	absolute.
 +
 If the last path components in the working tree's path is unique among
-working trees, it can be used to identify worktrees. For example if
+working trees, it can be used to identify working trees. For example if
 you only have two working trees, at `/abc/def/ghi` and `/abc/def/ggg`,
 then `ghi` or `def/ghi` is enough to point to the former working tree.
 
@@ -221,7 +221,7 @@ shared.
 
 Refs that are per working tree can still be accessed from another
 working tree via two special paths, `main-worktree` and `worktrees`. The
-former gives access to per-worktree refs of the main working tree,
+former gives access to per-working tree refs of the main working tree,
 while the latter to all linked working trees.
 
 For example, `main-worktree/HEAD` or `main-worktree/refs/bisect/good`
@@ -335,8 +335,8 @@ Porcelain Format
 The porcelain format has a line per attribute.  Attributes are listed with a
 label and value separated by a single space.  Boolean attributes (like `bare`
 and `detached`) are listed as a label only, and are only present if and only
-if the value is true.  The first attribute of a worktree is always `worktree`,
-an empty line indicates the end of the record.  For example:
+if the value is true.  The first attribute of a working tree is always
+`worktree`, an empty line indicates the end of the record.  For example:
 
 ------------
 $ git worktree list --porcelain
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 3/5] git-worktree.txt: fix minor grammatical issues
  2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
  2020-08-04  0:55   ` [PATCH v2 1/5] git-worktree.txt: employ fixed-width typeface consistently Eric Sunshine
  2020-08-04  0:55   ` [PATCH v2 2/5] git-worktree.txt: consistently use term "working tree" Eric Sunshine
@ 2020-08-04  0:55   ` Eric Sunshine
  2020-08-04  0:55   ` [PATCH v2 4/5] git-worktree.txt: make start of new sentence more obvious Eric Sunshine
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-04  0:55 UTC (permalink / raw)
  To: git
  Cc: Duy Nguyen, Junio C Hamano, Taylor Blau, Martin Ågren,
	Eric Sunshine

Fix a few grammatical problems to improve the reading experience.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 926f4662ee..ce2d40ee4c 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -82,7 +82,7 @@ list::
 
 List details of each working tree.  The main working tree is listed first,
 followed by each of the linked working trees.  The output details include
-if the working tree is bare, the revision currently checked out, and the
+whether the working tree is bare, the revision currently checked out, and the
 branch currently checked out (or "detached HEAD" if none).
 
 lock::
@@ -171,7 +171,7 @@ This can also be set up as the default behaviour by using the
 --lock::
 	Keep the working tree locked after creation. This is the
 	equivalent of `git worktree lock` after `git worktree add`,
-	but without race condition.
+	but without a race condition.
 
 -n::
 --dry-run::
@@ -202,21 +202,21 @@ This can also be set up as the default behaviour by using the
 	absolute.
 +
 If the last path components in the working tree's path is unique among
-working trees, it can be used to identify working trees. For example if
+working trees, it can be used to identify a working tree. For example if
 you only have two working trees, at `/abc/def/ghi` and `/abc/def/ggg`,
 then `ghi` or `def/ghi` is enough to point to the former working tree.
 
 REFS
 ----
 In multiple working trees, some refs may be shared between all working
-trees, some refs are local. One example is `HEAD` is different for all
-working trees. This section is about the sharing rules and how to access
+trees and some refs are local. One example is `HEAD` which is different for each
+working tree. This section is about the sharing rules and how to access
 refs of one working tree from another.
 
 In general, all pseudo refs are per working tree and all refs starting
 with `refs/` are shared. Pseudo refs are ones like `HEAD` which are
-directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There is one
-exception to this: refs inside `refs/bisect` and `refs/worktree` is not
+directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There are
+exceptions, however: refs inside `refs/bisect` and `refs/worktree` are not
 shared.
 
 Refs that are per working tree can still be accessed from another
@@ -243,7 +243,7 @@ already present in the config file, they will be applied to the main
 working trees only.
 
 In order to have configuration specific to working trees, you can turn
-on `worktreeConfig` extension, e.g.:
+on the `worktreeConfig` extension, e.g.:
 
 ------------
 $ git config extensions.worktreeConfig true
@@ -255,7 +255,7 @@ configuration in this file with `git config --worktree`. Older Git
 versions will refuse to access repositories with this extension.
 
 Note that in this file, the exception for `core.bare` and `core.worktree`
-is gone. If you have them in `$GIT_DIR/config` before, you must move
+is gone. If they exist in `$GIT_DIR/config`, you must move
 them to the `config.worktree` of the main working tree. You may also
 take this opportunity to review and move other configuration that you
 do not want to share to all working trees:
@@ -334,7 +334,7 @@ Porcelain Format
 ~~~~~~~~~~~~~~~~
 The porcelain format has a line per attribute.  Attributes are listed with a
 label and value separated by a single space.  Boolean attributes (like `bare`
-and `detached`) are listed as a label only, and are only present if and only
+and `detached`) are listed as a label only, and are present only
 if the value is true.  The first attribute of a working tree is always
 `worktree`, an empty line indicates the end of the record.  For example:
 
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 4/5] git-worktree.txt: make start of new sentence more obvious
  2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
                     ` (2 preceding siblings ...)
  2020-08-04  0:55   ` [PATCH v2 3/5] git-worktree.txt: fix minor grammatical issues Eric Sunshine
@ 2020-08-04  0:55   ` Eric Sunshine
  2020-08-04  0:55   ` [PATCH v2 5/5] git-wortkree.txt: link to man pages when citing other Git commands Eric Sunshine
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-04  0:55 UTC (permalink / raw)
  To: git
  Cc: Duy Nguyen, Junio C Hamano, Taylor Blau, Martin Ågren,
	Eric Sunshine

When reading the rendered description of `add`, it's easy to trip over
and miss the end of one sentence and the start of the next, making it
seem as if they are part of the same statement, separated only by a
dash:

    ... specific files such as HEAD, index, etc. - may also be
    specified as <commit-ish>; it is synonymous with...

This can be particularly confusing since the thoughts expressed by the
two sentences are unrelated. Reduce the likelihood of confusion by
making it obvious that the two sentences are distinct.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index ce2d40ee4c..544464f949 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -48,8 +48,8 @@ add <path> [<commit-ish>]::
 
 Create `<path>` and checkout `<commit-ish>` into it. The new working directory
 is linked to the current repository, sharing everything except working
-directory specific files such as `HEAD`, `index`, etc. `-` may also be
-specified as `<commit-ish>`; it is synonymous with `@{-1}`.
+directory specific files such as `HEAD`, `index`, etc. As a convenience,
+`<commit-ish>` may be a bare "`-`", which is synonymous with `@{-1}`.
 +
 If `<commit-ish>` is a branch name (call it `<branch>`) and is not found,
 and neither `-b` nor `-B` nor `--detach` are used, but there does
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH v2 5/5] git-wortkree.txt: link to man pages when citing other Git commands
  2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
                     ` (3 preceding siblings ...)
  2020-08-04  0:55   ` [PATCH v2 4/5] git-worktree.txt: make start of new sentence more obvious Eric Sunshine
@ 2020-08-04  0:55   ` Eric Sunshine
  2020-08-04  1:10   ` [PATCH v2 0/5] git-worktree documentation cleanups Taylor Blau
  2020-08-04  4:28   ` Martin Ågren
  6 siblings, 0 replies; 20+ messages in thread
From: Eric Sunshine @ 2020-08-04  0:55 UTC (permalink / raw)
  To: git
  Cc: Duy Nguyen, Junio C Hamano, Taylor Blau, Martin Ågren,
	Eric Sunshine

When citing other Git commands, rather than merely formatting them with
a fixed-width typeface, improve the reader experience by linking to them
directly via `linkgit:`.

Suggested-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/git-worktree.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 544464f949..6ee6ec7982 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -25,8 +25,9 @@ Manage multiple working trees attached to the same repository.
 A git repository can support multiple working trees, allowing you to check
 out more than one branch at a time.  With `git worktree add` a new working
 tree is associated with the repository.  This new working tree is called a
-"linked working tree" as opposed to the "main working tree" prepared by `git
-init` or `git clone`.  A repository has one main working tree (if it's not a
+"linked working tree" as opposed to the "main working tree" prepared by
+linkgit:git-init[1] or linkgit:git-clone[1].
+A repository has one main working tree (if it's not a
 bare repository) and zero or more linked working trees. When you are done
 with a linked working tree, remove it with `git worktree remove`.
 
-- 
2.28.0.236.gb10cc79966


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 0/5] git-worktree documentation cleanups
  2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
                     ` (4 preceding siblings ...)
  2020-08-04  0:55   ` [PATCH v2 5/5] git-wortkree.txt: link to man pages when citing other Git commands Eric Sunshine
@ 2020-08-04  1:10   ` Taylor Blau
  2020-08-04  4:28   ` Martin Ågren
  6 siblings, 0 replies; 20+ messages in thread
From: Taylor Blau @ 2020-08-04  1:10 UTC (permalink / raw)
  To: Eric Sunshine
  Cc: git, Duy Nguyen, Junio C Hamano, Taylor Blau, Martin Ågren

On Mon, Aug 03, 2020 at 08:55:30PM -0400, Eric Sunshine wrote:
> This is a re-roll of [1] which fixes some problems I ran across in the
> git-worktree documentation while working on another worktree-related
> topic.
>
> This version adds some `linkgit:` invocations, typesets `HEAD` as
> fixed-width, and covers a few additional places where backticks should
> have been applied in place of other quotes, as suggested by Martin[2],
> as well as a few more I noticed beyond those found by him. Although I
> had planned on adding backticks around `HEAD` in a separate patch, I
> ended up folding that change into patch 1 since there are relatively few
> such instances, and since, upon reflection, such a change didn't seem to
> warrant its own patch.
>
> I omitted Taylor's Reviewed-by:[4] since the patches have changed since
> he reviewed them, but he's welcome to give it again.

Thanks for dropping that. I looked at the inter-diff and skimmed the
re-rolled patches, and they all look good to me. You can add my

  Reviewed-by: Taylor Blau <me@ttaylorr.com>

back to these patches (really Junio can when he queues them).

Thanks.

>
> [1]: https://lore.kernel.org/git/20200803053612.50095-1-sunshine@sunshineco.com/
> [2]: https://lore.kernel.org/git/20200803175717.7465-1-martin.agren@gmail.com/
> [3]: https://lore.kernel.org/git/CAPig+cQtcxqQDAQ5bO6ica+Z7dd2+r8B+kXm0RK7qhpsAiX_xg@mail.gmail.com/
> [4]: https://lore.kernel.org/git/20200803161102.GB50799@syl.lan/
>
> Eric Sunshine (5):
>   git-worktree.txt: employ fixed-width typeface consistently
>   git-worktree.txt: consistently use term "working tree"
>   git-worktree.txt: fix minor grammatical issues
>   git-worktree.txt: make start of new sentence more obvious
>   git-wortkree.txt: link to man pages when citing other Git commands
>
>  Documentation/git-worktree.txt | 123 +++++++++++++++++----------------
>  1 file changed, 62 insertions(+), 61 deletions(-)
>
> Interdiff against v1:
> diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
> index 260bfe9105..6ee6ec7982 100644
> --- a/Documentation/git-worktree.txt
> +++ b/Documentation/git-worktree.txt
> @@ -25,8 +25,9 @@ Manage multiple working trees attached to the same repository.
>  A git repository can support multiple working trees, allowing you to check
>  out more than one branch at a time.  With `git worktree add` a new working
>  tree is associated with the repository.  This new working tree is called a
> -"linked working tree" as opposed to the "main working tree" prepared by "git
> -init" or "git clone".  A repository has one main working tree (if it's not a
> +"linked working tree" as opposed to the "main working tree" prepared by
> +linkgit:git-init[1] or linkgit:git-clone[1].
> +A repository has one main working tree (if it's not a
>  bare repository) and zero or more linked working trees. When you are done
>  with a linked working tree, remove it with `git worktree remove`.
>
> @@ -48,7 +49,7 @@ add <path> [<commit-ish>]::
>
>  Create `<path>` and checkout `<commit-ish>` into it. The new working directory
>  is linked to the current repository, sharing everything except working
> -directory specific files such as HEAD, index, etc. As a convenience,
> +directory specific files such as `HEAD`, `index`, etc. As a convenience,
>  `<commit-ish>` may be a bare "`-`", which is synonymous with `@{-1}`.
>  +
>  If `<commit-ish>` is a branch name (call it `<branch>`) and is not found,
> @@ -66,13 +67,13 @@ one for the purposes of disambiguation, even if the `<branch>` isn't
>  unique across all remotes. Set it to
>  e.g. `checkout.defaultRemote=origin` to always checkout remote
>  branches from there if `<branch>` is ambiguous but exists on the
> -'origin' remote. See also `checkout.defaultRemote` in
> +`origin` remote. See also `checkout.defaultRemote` in
>  linkgit:git-config[1].
>  +
>  If `<commit-ish>` is omitted and neither `-b` nor `-B` nor `--detach` used,
>  then, as a convenience, the new working tree is associated with a branch
>  (call it `<branch>`) named after `$(basename <path>)`.  If `<branch>`
> -doesn't exist, a new branch based on HEAD is automatically created as
> +doesn't exist, a new branch based on `HEAD` is automatically created as
>  if `-b <branch>` was given.  If `<branch>` does exist, it will be
>  checked out in the new working tree, if it's not checked out anywhere
>  else, otherwise the command will refuse to create the working tree (unless
> @@ -137,13 +138,13 @@ To remove a locked working tree, specify `--force` twice.
>  -B <new-branch>::
>  	With `add`, create a new branch named `<new-branch>` starting at
>  	`<commit-ish>`, and check out `<new-branch>` into the new working tree.
> -	If `<commit-ish>` is omitted, it defaults to HEAD.
> +	If `<commit-ish>` is omitted, it defaults to `HEAD`.
>  	By default, `-b` refuses to create a new branch if it already
>  	exists. `-B` overrides this safeguard, resetting `<new-branch>` to
>  	`<commit-ish>`.
>
>  --detach::
> -	With `add`, detach HEAD in the new working tree. See "DETACHED HEAD"
> +	With `add`, detach `HEAD` in the new working tree. See "DETACHED HEAD"
>  	in linkgit:git-checkout[1].
>
>  --[no-]checkout::
> @@ -154,7 +155,7 @@ To remove a locked working tree, specify `--force` twice.
>
>  --[no-]guess-remote::
>  	With `worktree add <path>`, without `<commit-ish>`, instead
> -	of creating a new branch from HEAD, if there exists a tracking
> +	of creating a new branch from `HEAD`, if there exists a tracking
>  	branch in exactly one remote matching the basename of `<path>`,
>  	base the new branch on the remote-tracking branch, and mark
>  	the remote-tracking branch as "upstream" from the new branch.
> @@ -166,7 +167,7 @@ This can also be set up as the default behaviour by using the
>  	When creating a new branch, if `<commit-ish>` is a branch,
>  	mark it as "upstream" from the new branch.  This is the
>  	default if `<commit-ish>` is a remote-tracking branch.  See
> -	"--track" in linkgit:git-branch[1] for details.
> +	`--track` in linkgit:git-branch[1] for details.
>
>  --lock::
>  	Keep the working tree locked after creation. This is the
> @@ -185,14 +186,14 @@ This can also be set up as the default behaviour by using the
>
>  -q::
>  --quiet::
> -	With 'add', suppress feedback messages.
> +	With `add`, suppress feedback messages.
>
>  -v::
>  --verbose::
>  	With `prune`, report all removals.
>
>  --expire <time>::
> -	With `prune`, only expire unused working trees older than <time>.
> +	With `prune`, only expire unused working trees older than `<time>`.
>
>  --reason <string>::
>  	With `lock`, an explanation why the working tree is locked.
> @@ -209,12 +210,12 @@ then `ghi` or `def/ghi` is enough to point to the former working tree.
>  REFS
>  ----
>  In multiple working trees, some refs may be shared between all working
> -trees and some refs are local. One example is HEAD which is different for each
> +trees and some refs are local. One example is `HEAD` which is different for each
>  working tree. This section is about the sharing rules and how to access
>  refs of one working tree from another.
>
>  In general, all pseudo refs are per working tree and all refs starting
> -with `refs/` are shared. Pseudo refs are ones like HEAD which are
> +with `refs/` are shared. Pseudo refs are ones like `HEAD` which are
>  directly under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There are
>  exceptions, however: refs inside `refs/bisect` and `refs/worktree` are not
>  shared.
> @@ -225,7 +226,7 @@ former gives access to per-working tree refs of the main working tree,
>  while the latter to all linked working trees.
>
>  For example, `main-worktree/HEAD` or `main-worktree/refs/bisect/good`
> -resolve to the same value as the main working tree's HEAD and
> +resolve to the same value as the main working tree's `HEAD` and
>  `refs/bisect/good` respectively. Similarly, `worktrees/foo/HEAD` or
>  `worktrees/bar/refs/bisect/bad` are the same as
>  `$GIT_COMMON_DIR/worktrees/foo/HEAD` and
> @@ -237,13 +238,13 @@ which will handle refs correctly.
>
>  CONFIGURATION FILE
>  ------------------
> -By default, the repository "config" file is shared across all working
> +By default, the repository `config` file is shared across all working
>  trees. If the config variables `core.bare` or `core.worktree` are
>  already present in the config file, they will be applied to the main
>  working trees only.
>
>  In order to have configuration specific to working trees, you can turn
> -on "worktreeConfig" extension, e.g.:
> +on the `worktreeConfig` extension, e.g.:
>
>  ------------
>  $ git config extensions.worktreeConfig true
> --
> 2.28.0.236.gb10cc79966
>

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 0/5] git-worktree documentation cleanups
  2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
                     ` (5 preceding siblings ...)
  2020-08-04  1:10   ` [PATCH v2 0/5] git-worktree documentation cleanups Taylor Blau
@ 2020-08-04  4:28   ` Martin Ågren
  2020-08-04  4:44     ` Eric Sunshine
  6 siblings, 1 reply; 20+ messages in thread
From: Martin Ågren @ 2020-08-04  4:28 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Git Mailing List, Duy Nguyen, Junio C Hamano, Taylor Blau

On Tue, 4 Aug 2020 at 02:56, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> This is a re-roll of [1] which fixes some problems I ran across in the
> git-worktree documentation while working on another worktree-related
> topic.

Thanks for this update.

> Eric Sunshine (5):
>   git-worktree.txt: employ fixed-width typeface consistently
>   git-worktree.txt: consistently use term "working tree"
>   git-worktree.txt: fix minor grammatical issues
>   git-worktree.txt: make start of new sentence more obvious
>   git-wortkree.txt: link to man pages when citing other Git commands

s/wortkree/worktree/ in the subject of the final, new patch.

I agree with all changes since v1, except ...

>  CONFIGURATION FILE
>  ------------------
> -By default, the repository "config" file is shared across all working
> +By default, the repository `config` file is shared across all working
>  trees. If the config variables `core.bare` or `core.worktree` are

I don't think this is a filename (in which case it would have been
`.gitconfig?) but rather some sort of colloquial short form for
'configuration file', thus '"config" file'. So I could see the double
quotes remain or being dropped, but I was surprised to see them
converted like this. But maybe you have a good reason, in which case I'm
sure it's good.

Martin

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 0/5] git-worktree documentation cleanups
  2020-08-04  4:28   ` Martin Ågren
@ 2020-08-04  4:44     ` Eric Sunshine
  2020-08-04  5:23       ` Martin Ågren
  0 siblings, 1 reply; 20+ messages in thread
From: Eric Sunshine @ 2020-08-04  4:44 UTC (permalink / raw)
  To: Martin Ågren
  Cc: Git Mailing List, Duy Nguyen, Junio C Hamano, Taylor Blau

On Tue, Aug 4, 2020 at 12:29 AM Martin Ågren <martin.agren@gmail.com> wrote:
> On Tue, 4 Aug 2020 at 02:56, Eric Sunshine <sunshine@sunshineco.com> wrote:
> >   git-wortkree.txt: link to man pages when citing other Git commands
>
> s/wortkree/worktree/ in the subject of the final, new patch.

Thanks. Perhaps Junio can tweak that when queuing, otherwise I'll fix
it if I re-roll, otherwise it's minor enough that I won't worry about
it if it makes it into permanent history.

> I agree with all changes since v1, except ...
>
> > -By default, the repository "config" file is shared across all working
> > +By default, the repository `config` file is shared across all working
>
> I don't think this is a filename (in which case it would have been
> `.gitconfig?) but rather some sort of colloquial short form for
> 'configuration file', thus '"config" file'. So I could see the double
> quotes remain or being dropped, but I was surprised to see them
> converted like this.

I also thought at first that it was just shorthand for "configuration
file", but then I realized that it's talking about the `.git/config`
file, in which case it is an actual filename. So, I believe that
quoting it with backticks is correct here.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v2 0/5] git-worktree documentation cleanups
  2020-08-04  4:44     ` Eric Sunshine
@ 2020-08-04  5:23       ` Martin Ågren
  0 siblings, 0 replies; 20+ messages in thread
From: Martin Ågren @ 2020-08-04  5:23 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Git Mailing List, Duy Nguyen, Junio C Hamano, Taylor Blau

On Tue, 4 Aug 2020 at 06:44, Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Tue, Aug 4, 2020 at 12:29 AM Martin Ågren <martin.agren@gmail.com> wrote:
> > On Tue, 4 Aug 2020 at 02:56, Eric Sunshine <sunshine@sunshineco.com> wrote:
> >
> > > -By default, the repository "config" file is shared across all working
> > > +By default, the repository `config` file is shared across all working
> >
> > I don't think this is a filename (in which case it would have been
> > `.gitconfig?) but rather some sort of colloquial short form for
> > 'configuration file', thus '"config" file'. So I could see the double
> > quotes remain or being dropped, but I was surprised to see them
> > converted like this.
>
> I also thought at first that it was just shorthand for "configuration
> file", but then I realized that it's talking about the `.git/config`
> file, in which case it is an actual filename. So, I believe that
> quoting it with backticks is correct here.

Yes, you're perfectly right, of course.

Thanks
Martin

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-08-04  5:23 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03  5:36 [PATCH 0/4] git-worktree documentation cleanups Eric Sunshine
2020-08-03  5:36 ` [PATCH 1/4] git-worktree.txt: employ fixed-width typeface consistently Eric Sunshine
2020-08-03  5:36 ` [PATCH 2/4] git-worktree.txt: consistently use term "working tree" Eric Sunshine
2020-08-03  5:36 ` [PATCH 3/4] git-worktree.txt: fix minor grammatical issues Eric Sunshine
2020-08-03  5:36 ` [PATCH 4/4] git-worktree.txt: make start of new sentence more obvious Eric Sunshine
2020-08-03 16:11 ` [PATCH 0/4] git-worktree documentation cleanups Taylor Blau
2020-08-03 17:14   ` Junio C Hamano
2020-08-03 17:57 ` Martin Ågren
2020-08-03 23:54   ` Eric Sunshine
2020-08-04  0:15     ` Junio C Hamano
2020-08-04  0:55 ` [PATCH v2 0/5] " Eric Sunshine
2020-08-04  0:55   ` [PATCH v2 1/5] git-worktree.txt: employ fixed-width typeface consistently Eric Sunshine
2020-08-04  0:55   ` [PATCH v2 2/5] git-worktree.txt: consistently use term "working tree" Eric Sunshine
2020-08-04  0:55   ` [PATCH v2 3/5] git-worktree.txt: fix minor grammatical issues Eric Sunshine
2020-08-04  0:55   ` [PATCH v2 4/5] git-worktree.txt: make start of new sentence more obvious Eric Sunshine
2020-08-04  0:55   ` [PATCH v2 5/5] git-wortkree.txt: link to man pages when citing other Git commands Eric Sunshine
2020-08-04  1:10   ` [PATCH v2 0/5] git-worktree documentation cleanups Taylor Blau
2020-08-04  4:28   ` Martin Ågren
2020-08-04  4:44     ` Eric Sunshine
2020-08-04  5:23       ` Martin Ågren

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).