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

Documentation lingering inconsistency between working directory and working tree

From
YSYazeed Sabri <yazeed.sabri@kaust.edu.sa>
Date
Jul 17, 2017, 19:34 UTC
Message-ID
<CAL+VFimBfxTrRVme_aMzF4yYRnru0hHD4VzxEtD8hHY6rx2ykA@mail.gmail.com>
Hi all,

I have been reading the git documentation for a while now and came to realize that in a lot of commands the documentation is ambiguous when it comes to the difference between "working directory" and "working tree". I'm aware of the changes to status in this commit for example:

commit 2a0e6cdedab306eccbd297c051035c13d0266343
Author: Lars Vogel <lars.vogel@gmail.com>
Date:   Thu Jun 9 20:19:30 2016 +0200
    Use "working tree" instead of "working directory" for git status
    Working directory can be easily confused with the current directory.
    In one of my patches I already updated the usage of working
directory
    with working tree for the man page but I noticed that git status
also
    uses this incorrect term.
    Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/wt-status.c b/wt-status.c
index 4f27bd62a..4ce4e35ac 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1554,7 +1554,7 @@ void wt_status_print(struct wt_status *s)
                        else
                                printf(_("nothing to commit\n"));
                } else
-                       printf(_("nothing to commit, working directory
clean\n"));
+                       printf(_("nothing to commit, working tree
clean\n"));
        }
 }



and more frequently used commands like add are consistent as well. But a
grep on the documentation to a pull I did today, shows that a lot of
commands are still
not updated accordingly.

This brings me to my next point, so what is the precise definition of
each concept? Is
working directory just an outdated mistake?

Was the change in status above made to solve the confusion and denote
that status
is unique per-working tree given its HEAD? If this is the case, then
is gc unique
per-working tree too, or is it done on the "database" like fsck? Same
idea with stash,
does stash care on what working tree it was called? If not, does it
make sense for
it to do so?


Best,
Yazeed
-- 
------------------------------
This message and its contents, including attachments are intended solely 
for the original recipient. If you are not the intended recipient or have 
received this message in error, please notify me immediately and delete 
this message from your computer system. Any unauthorized use or 
distribution is prohibited. Please consider the environment before printing 
this email.
Message 1 of 1 in “Documentation lingering inconsistency between working directory and working tree”
  1. Yazeed SabriJul 17, 2017

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.