From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH v1 3/3] Documentation: your checkout directory is "working tree" (part 2)
Date: Tue, 11 Nov 2025 11:58:53 -0800 [thread overview]
Message-ID: <20251111195853.2511146-4-gitster@pobox.com> (raw)
In-Reply-To: <20251111195853.2511146-1-gitster@pobox.com>
The same fix as the previous step, which replaced "work tree" with
"working tree" where appropriate, but this batch addresses the two
word phrase that are split across lines.
Since I didn't come up with a clever "grep" pattern to work across
line boundaries, I used pickaxe to find a block of "word 'work'
appears near the end of line, possibly followed by a run of
whitespaces or asterisks, then a newline, and then possibly a run of
whitespaces or asterisks, then word 'tree'" in the comparison
between an empty tree and what we have today, like so:
$ LF=$'\n' WS="[* "$'\t'"]"
$ git diff --pickaxe-regex -S"work$WS*$LF$WS*tree" \
4b825dc642cb6 -- ':(glob)Documentation/*.adoc' |
grep -A1 -e '^diff --git' -e "work${WS}$"
after finishing the previous two steps.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/git-add.adoc | 2 +-
Documentation/git-read-tree.adoc | 2 +-
Documentation/git-rm.adoc | 4 ++--
Documentation/git-submodule.adoc | 2 +-
Documentation/gitcli.adoc | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-add.adoc b/Documentation/git-add.adoc
index 18e7ed9b79..ced77a4713 100644
--- a/Documentation/git-add.adoc
+++ b/Documentation/git-add.adoc
@@ -173,7 +173,7 @@ for `git add --no-all <pathspec>...`, i.e. ignored removed files.
`--ignore-missing`::
This option can only be used together with `--dry-run`. By using
this option the user can check if any of the given files would
- be ignored, no matter if they are already present in the work
+ be ignored, no matter if they are already present in the working
tree or not.
`--no-warn-embedded-repo`::
diff --git a/Documentation/git-read-tree.adoc b/Documentation/git-read-tree.adoc
index 9d60badd74..0110ac9cb8 100644
--- a/Documentation/git-read-tree.adoc
+++ b/Documentation/git-read-tree.adoc
@@ -43,7 +43,7 @@ OPTIONS
abort the operation.
-u::
- After a successful merge, update the files in the work
+ After a successful merge, update the files in the working
tree with the result of the merge.
-i::
diff --git a/Documentation/git-rm.adoc b/Documentation/git-rm.adoc
index a7a3068381..dce054ea5d 100644
--- a/Documentation/git-rm.adoc
+++ b/Documentation/git-rm.adoc
@@ -152,7 +152,7 @@ git diff --name-only --diff-filter=D -z | xargs -0 git rm --cached
SUBMODULES
----------
Only submodules using a gitfile (which means they were cloned
-with a Git version 1.7.8 or newer) will be removed from the work
+with a Git version 1.7.8 or newer) will be removed from the working
tree, as their repository lives inside the `.git` directory of the
superproject. If a submodule (or one of those nested inside it)
still uses a `.git` directory, `git rm` moves the submodules
@@ -164,7 +164,7 @@ will be staged (unless `--cached` or `-n` are used).
A submodule is considered up to date when the `HEAD` is the same as
recorded in the index, no tracked files are modified and no untracked
files that aren't ignored are present in the submodule's working tree.
-Ignored files are deemed expendable and won't stop a submodule's work
+Ignored files are deemed expendable and won't stop a submodule's working
tree from being removed.
If you only want to remove the local checkout of a submodule from your
diff --git a/Documentation/git-submodule.adoc b/Documentation/git-submodule.adoc
index bdba17d166..df682b8b10 100644
--- a/Documentation/git-submodule.adoc
+++ b/Documentation/git-submodule.adoc
@@ -123,7 +123,7 @@ See the add subcommand for the definition of default remote.
deinit [-f|--force] (--all|[--] <path>...)::
Unregister the given submodules, i.e. remove the whole
- `submodule.$name` section from .git/config together with their work
+ `submodule.$name` section from .git/config together with their working
tree. Further calls to `git submodule update`, `git submodule foreach`
and `git submodule sync` will skip any unregistered submodules until
they are initialized again, so use this command if you don't want to
diff --git a/Documentation/gitcli.adoc b/Documentation/gitcli.adoc
index db88e84aaf..d3df9fed31 100644
--- a/Documentation/gitcli.adoc
+++ b/Documentation/gitcli.adoc
@@ -35,7 +35,7 @@ arguments. Here are the rules:
* When an argument can be misunderstood as either a revision or a path,
they can be disambiguated by placing `--` between them.
- E.g. `git diff -- HEAD` is, "I have a file called HEAD in my work
+ E.g. `git diff -- HEAD` is, "I have a file called HEAD in my working
tree. Please show changes between the version I staged in the index
and what I have in the working tree for that file", not "show the difference
between the HEAD commit and the working tree as a whole". You can say
--
2.52.0-rc1-455-g30608eb744
prev parent reply other threads:[~2025-11-11 19:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 19:58 [PATCH v1 0/3] War on "work tree" Junio C Hamano
2025-11-11 19:58 ` [PATCH v1 1/3] notes doc: call NOTES_MERGE_WORKTREE a "worktree", not " Junio C Hamano
2025-11-11 19:58 ` [PATCH v1 2/3] Documentation: your checkout directory is "working tree" (part 1) Junio C Hamano
2025-11-12 6:41 ` Patrick Steinhardt
2025-11-11 19:58 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251111195853.2511146-4-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.