Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-14 01:15:57 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-14 01:15:57 +0300
commita7c2daa06d6f7d8fd13a1d72f23741acbaeba522 (patch)
treeb1b0095d267b98188a7ae24ac77934298b665649 /Documentation
parent1fdfb774aaaa0ee8acb0a1ec9b601e5a2d2999f1 (diff)
parent0e29222e0c2f68118cdd3412515539b74433b732 (diff)
Merge branch 'en/removing-untracked-fixes'
Various fixes in code paths that move untracked files away to make room. * en/removing-untracked-fixes: Documentation: call out commands that nuke untracked files/directories Comment important codepaths regarding nuking untracked files/dirs unpack-trees: avoid nuking untracked dir in way of locally deleted file unpack-trees: avoid nuking untracked dir in way of unmerged file Change unpack_trees' 'reset' flag into an enum Remove ignored files by default when they are in the way unpack-trees: make dir an internal-only struct unpack-trees: introduce preserve_ignored to unpack_trees_options read-tree, merge-recursive: overwrite ignored files by default checkout, read-tree: fix leak of unpack_trees_options.dir t2500: add various tests for nuking untracked files
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-checkout.txt5
-rw-r--r--Documentation/git-read-tree.txt23
-rw-r--r--Documentation/git-reset.txt3
3 files changed, 9 insertions, 22 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index b1a6fe4499..d473c9bf38 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -118,8 +118,9 @@ OPTIONS
-f::
--force::
When switching branches, proceed even if the index or the
- working tree differs from `HEAD`. This is used to throw away
- local changes.
+ working tree differs from `HEAD`, and even if there are untracked
+ files in the way. This is used to throw away local changes and
+ any untracked files or directories that are in the way.
+
When checking out paths from the index, do not fail upon unmerged
entries; instead, unmerged entries are ignored.
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index 5fa8bab64c..8c3aceb832 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -10,8 +10,7 @@ SYNOPSIS
--------
[verse]
'git read-tree' [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>]
- [-u [--exclude-per-directory=<gitignore>] | -i]]
- [--index-output=<file>] [--no-sparse-checkout]
+ [-u | -i]] [--index-output=<file>] [--no-sparse-checkout]
(--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])
@@ -39,8 +38,9 @@ OPTIONS
--reset::
Same as -m, except that unmerged entries are discarded instead
- of failing. When used with `-u`, updates leading to loss of
- working tree changes will not abort the operation.
+ of failing. When used with `-u`, updates leading to loss of
+ working tree changes or untracked files or directories will not
+ abort the operation.
-u::
After a successful merge, update the files in the work
@@ -88,21 +88,6 @@ OPTIONS
The command will refuse to overwrite entries that already
existed in the original index file.
---exclude-per-directory=<gitignore>::
- When running the command with `-u` and `-m` options, the
- merge result may need to overwrite paths that are not
- tracked in the current branch. The command usually
- refuses to proceed with the merge to avoid losing such a
- path. However this safety valve sometimes gets in the
- way. For example, it often happens that the other
- branch added a file that used to be a generated file in
- your branch, and the safety valve triggers when you try
- to switch to that branch after you ran `make` but before
- running `make clean` to remove the generated file. This
- option tells the command to read per-directory exclude
- file (usually '.gitignore') and allows such an untracked
- but explicitly ignored file to be overwritten.
-
--index-output=<file>::
Instead of writing the results out to `$GIT_INDEX_FILE`,
write the resulting index in the named file. While the
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index 252e2d4e47..6f7685f53d 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -69,7 +69,8 @@ linkgit:git-add[1]).
--hard::
Resets the index and working tree. Any changes to tracked files in the
- working tree since `<commit>` are discarded.
+ working tree since `<commit>` are discarded. Any untracked files or
+ directories in the way of writing any tracked files are simply deleted.
--merge::
Resets the index and updates the files in the working tree that are