diff mbox series

[09/11] worktree: use 'worktree' over 'working tree'

Message ID 23e74c87116175924bfc389eb07fa96b4040fa0d.1645379667.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Updates to worktree code and docs | expand

Commit Message

Derrick Stolee Feb. 20, 2022, 5:54 p.m. UTC
From: Derrick Stolee <derrickstolee@github.com>

It is helpful to distinguish between a 'working tree' and a 'worktree'.
A worktree contains a working tree plus additional metadata. This
metadata includes per-worktree refs and worktree-specific config.

This is the fifth of multiple changes to git-worktree.txt, restricted to
the CONFIGURATION FILE section.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
---
 Documentation/git-worktree.txt | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Taylor Blau Feb. 20, 2022, 10:31 p.m. UTC | #1
On Sun, Feb 20, 2022 at 05:54:25PM +0000, Derrick Stolee via GitGitGadget wrote:
> From: Derrick Stolee <derrickstolee@github.com>
>
> It is helpful to distinguish between a 'working tree' and a 'worktree'.
> A worktree contains a working tree plus additional metadata. This
> metadata includes per-worktree refs and worktree-specific config.
>
> This is the fifth of multiple changes to git-worktree.txt, restricted to
> the CONFIGURATION FILE section.
>
> Signed-off-by: Derrick Stolee <derrickstolee@github.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 54a2c335fd5..8821e56c6ec 100644
> --- a/Documentation/git-worktree.txt
> +++ b/Documentation/git-worktree.txt
> @@ -283,12 +283,12 @@ which will handle refs correctly.
>
>  CONFIGURATION FILE
>  ------------------
> -By default, the repository `config` file is shared across all working
> -trees. If the config variables `core.bare` or `core.worktree` are
> -present in the common config file and `extensions.worktreeConfig` is
> -disabled, then they will be applied to the main working tree only.
> +By default, the repository `config` file is shared across all worktrees.
> +If the config variables `core.bare` or `core.worktree` are present in the
> +common config file and `extensions.worktreeConfig` is disabled, then they
> +will be applied to the main worktree only.
>
> -In order to have configuration specific to working trees, you can turn
> +In order to have configuration specific to worktrees, you can turn

Also not the fault of this patch, but I wonder if this would be more
clearly worded as:

    In order to have worktree-specific configuration, you can [...].

>  on the `worktreeConfig` extension, e.g.:
>
>  ------------
> @@ -302,16 +302,16 @@ 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 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:
> +them to the `config.worktree` of the main worktree. You may also take this
> +opportunity to review and move other configuration that you do not want to
> +share to all worktrees:
>
>   - `core.worktree` should never be shared.
>
>   - `core.bare` should not be shared if the value is `core.bare=true`.
>
> - - `core.sparseCheckout` is recommended per working tree, unless you
> -   are sure you always use sparse checkout for all working trees.
> + - `core.sparseCheckout` is recommended per worktree, unless you are sure
> +   you always use sparse checkout for all worktrees.

Another minor point, but perhaps the third bullet should share more
language with the first two. Maybe instead:

    - `core.sparseCheckout` should not be shared, unless you are sure
      you always use sparse checkout among all worktrees.

Feel free (in this instance, and in any others) to ignore these
suggestions. I wouldn't raise them in an ordinary review, but I figure
since we are already tweaking the language in this file, it couldn't
hurt to mention here...

Thanks,
Taylor
Derrick Stolee Feb. 21, 2022, 2:26 a.m. UTC | #2
On 2/20/2022 5:31 PM, Taylor Blau wrote:
> On Sun, Feb 20, 2022 at 05:54:25PM +0000, Derrick Stolee via GitGitGadget wrote:
>> From: Derrick Stolee <derrickstolee@github.com>
...
>> -In order to have configuration specific to working trees, you can turn
>> +In order to have configuration specific to worktrees, you can turn
> 
> Also not the fault of this patch, but I wonder if this would be more
> clearly worded as:
> 
>     In order to have worktree-specific configuration, you can [...].
> 

I like this change.

>>   - `core.worktree` should never be shared.
>>
>>   - `core.bare` should not be shared if the value is `core.bare=true`.
>>
>> - - `core.sparseCheckout` is recommended per working tree, unless you
>> -   are sure you always use sparse checkout for all working trees.
>> + - `core.sparseCheckout` is recommended per worktree, unless you are sure
>> +   you always use sparse checkout for all worktrees.
> 
> Another minor point, but perhaps the third bullet should share more
> language with the first two. Maybe instead:
> 
>     - `core.sparseCheckout` should not be shared, unless you are sure
>       you always use sparse checkout among all worktrees.

I thought I had a good reason to deviate here, but looking at it now I
agree with you.

Thanks,
-Stolee
diff mbox series

Patch

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 54a2c335fd5..8821e56c6ec 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -283,12 +283,12 @@  which will handle refs correctly.
 
 CONFIGURATION FILE
 ------------------
-By default, the repository `config` file is shared across all working
-trees. If the config variables `core.bare` or `core.worktree` are
-present in the common config file and `extensions.worktreeConfig` is
-disabled, then they will be applied to the main working tree only.
+By default, the repository `config` file is shared across all worktrees.
+If the config variables `core.bare` or `core.worktree` are present in the
+common config file and `extensions.worktreeConfig` is disabled, then they
+will be applied to the main worktree only.
 
-In order to have configuration specific to working trees, you can turn
+In order to have configuration specific to worktrees, you can turn
 on the `worktreeConfig` extension, e.g.:
 
 ------------
@@ -302,16 +302,16 @@  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 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:
+them to the `config.worktree` of the main worktree. You may also take this
+opportunity to review and move other configuration that you do not want to
+share to all worktrees:
 
  - `core.worktree` should never be shared.
 
  - `core.bare` should not be shared if the value is `core.bare=true`.
 
- - `core.sparseCheckout` is recommended per working tree, unless you
-   are sure you always use sparse checkout for all working trees.
+ - `core.sparseCheckout` is recommended per worktree, unless you are sure
+   you always use sparse checkout for all worktrees.
 
 See the documentation of `extensions.worktreeConfig` in
 linkgit:git-config[1] for more details.