git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Worktree vs. working copy

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 20, 2011, 21:45 UTC
Message-ID
<7vliti2hoq.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1316550362.8701.32.camel@centaur.lab.cmartin.tk>
Carlos Martín Nieto <cmn@elego.de> writes:
Show 6 quoted lines
> Subject: [PATCH] Remove 'working copy' from the documentation and C code
>
> The git term is 'working tree', so replace the most public references
> to 'working copy'.
>
> Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Thanks.

"working tree" is a term used to collectively call the whole, and I think all the places in your patch read better with "working tree".

People with background from other systems refer to one particular file in the working tree as "working copy", I think, but...

>  core.fileMode::
>  	If false, the executable bit differences between the index and
> -	the working copy are ignored; useful on broken filesystems like FAT.
> +	the working tree are ignored; useful on broken filesystems like FAT.

... this compares "the index and the working tree", meaning each path in the index and the corresponding file in the working tree (both are taken as a _collection_), so this rewrite makes perfect sense. The same for the description for trustctime.

Show 6 quoted lines
> @@ -292,7 +292,7 @@ core.ignoreStat::
>  	If true, commands which modify both the working tree and the index
>  	will mark the updated paths with the "assume unchanged" bit in the
>  	index. These marked files are then assumed to stay unchanged in the
> -	working copy, until you	mark them otherwise manually - Git will not
> +	working tree, until you mark them otherwise manually - Git will not

This again is "paths in the" working tree, and the term is used as a collection (good). The same for "git-svn" manpage.

Show 11 quoted lines
> diff --git a/diff-lib.c b/diff-lib.c
> index 9c29293..c7d33d7 100644
> --- a/diff-lib.c
> +++ b/diff-lib.c
> @@ -289,7 +289,7 @@ static void show_new_file(struct rev_info *revs,
>  
>  	/*
>  	 * New file in the index: it might actually be different in
> -	 * the working copy.
> +	 * the working tree.
>  	 */

We are looking at one path, and wondering if it is different "in the" working tree---again used as a collection (it would have said "it might actually be different from the working copy" if it referred to an instance in the collection). The same for the comment in merge-recursive.c.

Previous: Carlos Martín Nieto
Message 7 of 7 in “Worktree vs. working copy”
  1. Carlos Martín NietoSep 20, 2011
  2. Michael HaggertySep 20, 2011
  3. Nguyen Thai Ngoc DuySep 20, 2011
  4. Ramkumar RamachandraSep 20, 2011
  5. Junio C HamanoSep 20, 2011
  6. Carlos Martín NietoSep 20, 2011
  7. Junio C HamanoSep 20, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.