git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Cc: "mailto:sunshine@sunshineco.com"
	<"[sunshine@sunshineco.com]"@vger.kernel.org>,
	"mailto:gitster@pobox.com"
	<"[gitster@pobox.com]"@vger.kernel.org>,
	"Elijah Newren [ ]" <newren@gmail.com>,
	"Jean-Noël AVILA [ ]" <jn.avila@free.fr>,
	"Derrick Stolee" <derrickstolee@github.com>
Subject: Re: [PATCH 05/11] worktree: use 'worktree' over 'working tree'
Date: Thu, 24 Feb 2022 14:33:01 +0000	[thread overview]
Message-ID: <d9394947-f545-2dd9-b788-38fd7202243d@iee.email> (raw)
In-Reply-To: <a6a8eb8e7bb4520bfe37d3a79329cce7886af59c.1645379667.git.gitgitgadget@gmail.com>

On 20/02/2022 17:54, 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.
Doesn't this need a clear call-out in the text to highlight the
distinction, so that it is obvious at first glance to the casual reader?

I'd ended up with something like:
- worktree
    A directory whose files and sub-directories are (selectively) under
Git revision management.
- working tree
    The working tree comprises Git revision management meta-data for the
worktree,
     and the worktree itself.
    The meta-data may be independently located away from the worktree's
data.

The key feature is to have a layout structure that shows the distinction.

Or are we trying to remove all references to "working tree"? Or have I
misunderstood?

Philip

>
> This is the first of multiple changes to git-worktree.txt, restricted to
> the DESCRIPTION section.
>
> Signed-off-by: Derrick Stolee <derrickstolee@github.com>
> ---
>  Documentation/git-worktree.txt | 53 ++++++++++++++++++----------------
>  1 file changed, 28 insertions(+), 25 deletions(-)
>
> diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
> index b8d53c48303..d9705062e9d 100644
> --- a/Documentation/git-worktree.txt
> +++ b/Documentation/git-worktree.txt
> @@ -25,45 +25,48 @@ Manage multiple working trees attached to the same repository.
>  
>  A git repository can support multiple working trees, allowing you to check
Are we removing the above "working trees" phrases as well?
>  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
> -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`.
> +tree is associated with the repository, along with additional metadata
> +that differentiates that working tree from others in the same repository.
> +The working tree, along with this metada, is called a "worktree".
> +
> +This new worktree is called a "linked worktree" as opposed to the "main
> +worktree" prepared by linkgit:git-init[1] or linkgit:git-clone[1].
> +A repository has one main worktree (if it's not a bare repository) and
> +zero or more linked worktrees. When you are done with a linked worktree,
> +remove it with `git worktree remove`.
>  
>  In its simplest form, `git worktree add <path>` automatically creates a
>  new branch whose name is the final component of `<path>`, which is
>  convenient if you plan to work on a new topic. For instance, `git
>  worktree add ../hotfix` creates new branch `hotfix` and checks it out at
> -path `../hotfix`. To instead work on an existing branch in a new working
> -tree, use `git worktree add <path> <branch>`. On the other hand, if you
> -just plan to make some experimental changes or do testing without
> -disturbing existing development, it is often convenient to create a
> -'throwaway' working tree not associated with any branch. For instance,
> -`git worktree add -d <path>` creates a new working tree with a detached
> -`HEAD` at the same commit as the current branch.
> -
> -If a working tree is deleted without using `git worktree remove`, then
> +path `../hotfix`. To instead work on an existing branch in a new worktree,
> +use `git worktree add <path> <branch>`. On the other hand, if you just
> +plan to make some experimental changes or do testing without disturbing
> +existing development, it is often convenient to create a 'throwaway'
> +worktree not associated with any branch. For instance,
> +`git worktree add -d <path>` creates a new worktree with a detached `HEAD`
> +at the same commit as the current branch.
> +
> +If a worktree is deleted without using `git worktree remove`, then
>  its associated administrative files, which reside in the repository
>  (see "DETAILS" below), will eventually be removed automatically (see
>  `gc.worktreePruneExpire` in linkgit:git-config[1]), or you can run
> -`git worktree prune` in the main or any linked working tree to
> -clean up any stale administrative files.
> +`git worktree prune` in the main or any linked worktree to clean up any
> +stale administrative files.
>  
> -If a linked working tree is stored on a portable device or network share
> -which is not always mounted, you can prevent its administrative files from
> -being pruned by issuing the `git worktree lock` command, optionally
> -specifying `--reason` to explain why the working tree is locked.
> +If a linked worktree is stored on a portable device or network share which
> +is not always mounted, you can prevent its administrative files from being
> +pruned by issuing the `git worktree lock` command, optionally specifying
> +`--reason` to explain why the worktree is locked.
>  
>  COMMANDS
>  --------
>  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,
> -`<commit-ish>` may be a bare "`-`", which is synonymous with `@{-1}`.
> +Create `<path>` and checkout `<commit-ish>` into it. The new worktree
> +is linked to the current repository, sharing everything except per-worktree
> +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


  parent reply	other threads:[~2022-02-24 14:33 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-20 17:54 [PATCH 00/11] Updates to worktree code and docs Derrick Stolee via GitGitGadget
2022-02-20 17:54 ` [PATCH 01/11] worktree: combine two translatable messages Derrick Stolee via GitGitGadget
2022-02-20 20:22   ` Junio C Hamano
2022-02-20 20:29     ` Derrick Stolee
2022-02-20 17:54 ` [PATCH 02/11] worktree: extract copy_filtered_worktree_config() Derrick Stolee via GitGitGadget
2022-02-20 20:26   ` Junio C Hamano
2022-02-20 17:54 ` [PATCH 03/11] worktree: extract copy_sparse_checkout() Derrick Stolee via GitGitGadget
2022-02-20 17:54 ` [PATCH 04/11] worktree: extract checkout_worktree() Derrick Stolee via GitGitGadget
2022-02-20 21:59   ` Taylor Blau
2022-02-20 17:54 ` [PATCH 05/11] worktree: use 'worktree' over 'working tree' Derrick Stolee via GitGitGadget
2022-02-20 20:42   ` Junio C Hamano
2022-02-20 20:48     ` Derrick Stolee
2022-02-24 14:33   ` Philip Oakley [this message]
2022-02-24 15:53     ` Derrick Stolee
2022-03-03 15:41       ` Philip Oakley
2022-02-20 17:54 ` [PATCH 06/11] " Derrick Stolee via GitGitGadget
2022-02-20 17:54 ` [PATCH 07/11] " Derrick Stolee via GitGitGadget
2022-02-20 17:54 ` [PATCH 08/11] " Derrick Stolee via GitGitGadget
2022-02-20 22:29   ` Taylor Blau
2022-02-20 17:54 ` [PATCH 09/11] " Derrick Stolee via GitGitGadget
2022-02-20 22:31   ` Taylor Blau
2022-02-21  2:26     ` Derrick Stolee
2022-02-20 17:54 ` [PATCH 10/11] " Derrick Stolee via GitGitGadget
2022-02-20 17:54 ` [PATCH 11/11] " Derrick Stolee via GitGitGadget
2022-02-20 22:37   ` Taylor Blau
2022-02-21  2:11     ` Derrick Stolee
2022-02-20 22:38 ` [PATCH 00/11] Updates to worktree code and docs Taylor Blau
2022-02-20 22:41   ` Taylor Blau
2022-02-22  0:17 ` [PATCH v2 " Derrick Stolee via GitGitGadget
2022-02-22  0:17   ` [PATCH v2 01/11] worktree: combine two translatable messages Derrick Stolee via GitGitGadget
2022-02-22  0:17   ` [PATCH v2 02/11] worktree: extract copy_filtered_worktree_config() Derrick Stolee via GitGitGadget
2022-02-22  0:17   ` [PATCH v2 03/11] worktree: extract copy_sparse_checkout() Derrick Stolee via GitGitGadget
2022-02-22  0:17   ` [PATCH v2 04/11] worktree: extract checkout_worktree() Derrick Stolee via GitGitGadget
2022-02-22  0:17   ` [PATCH v2 05/11] worktree: use 'worktree' over 'working tree' Derrick Stolee via GitGitGadget
2022-02-22  7:22     ` Junio C Hamano
2022-02-23  6:47     ` Elijah Newren
2022-02-22  0:17   ` [PATCH v2 06/11] " Derrick Stolee via GitGitGadget
2022-02-22  7:22     ` Junio C Hamano
2022-02-22 14:06       ` Derrick Stolee
2022-02-22  0:17   ` [PATCH v2 07/11] " Derrick Stolee via GitGitGadget
2022-02-22  0:17   ` [PATCH v2 08/11] " Derrick Stolee via GitGitGadget
2022-02-22 19:49     ` Taylor Blau
2022-02-22 21:24       ` Derrick Stolee
2022-02-23  0:05         ` Taylor Blau
2022-02-22  0:17   ` [PATCH v2 09/11] " Derrick Stolee via GitGitGadget
2022-02-22  0:17   ` [PATCH v2 10/11] " Derrick Stolee via GitGitGadget
2022-02-22  0:18   ` [PATCH v2 11/11] " Derrick Stolee via GitGitGadget
2022-02-22 19:50   ` [PATCH v2 00/11] Updates to worktree code and docs Taylor Blau
2022-02-23 20:24     ` Junio C Hamano
2022-02-23  6:51   ` Elijah Newren
2022-02-23 14:26     ` Derrick Stolee
2022-02-23 14:29   ` [PATCH v3 " Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 01/11] worktree: combine two translatable messages Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 02/11] worktree: extract copy_filtered_worktree_config() Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 03/11] worktree: extract copy_sparse_checkout() Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 04/11] worktree: extract checkout_worktree() Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 05/11] worktree: use 'worktree' over 'working tree' Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 06/11] " Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 07/11] " Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 08/11] " Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 09/11] " Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 10/11] " Derrick Stolee via GitGitGadget
2022-02-23 14:29     ` [PATCH v3 11/11] " Derrick Stolee via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d9394947-f545-2dd9-b788-38fd7202243d@iee.email \
    --to=philipoakley@iee.email \
    --cc="[gitster@pobox.com]"@vger.kernel.org \
    --cc="[sunshine@sunshineco.com]"@vger.kernel.org \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=jn.avila@free.fr \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).