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:
authorElijah Newren <newren@gmail.com>2021-12-09 08:08:29 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-10 00:33:13 +0300
commit00fcce285db3db48f85730a183421fdb488c14cc (patch)
treeffe8f96c41a663f7582422de1771ec21045aa8ad /t/t2501-cwd-empty.sh
parent0b0ee3388cf080c4200c235ee699bd95c960c167 (diff)
symlinks: do not include startup_info->original_cwd in dir removal
symlinks has a pair of schedule_dir_for_removal() and remove_scheduled_dirs() functions that ensure that directories made empty by removing other files also themselves get removed. However, we want to exclude startup_info->original_cwd and leave it around. This avoids the user getting confused by subsequent git commands (and non-git commands) that would otherwise report confusing messages about being unable to read the current working directory. Acked-by: Derrick Stolee <stolee@gmail.com> Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2501-cwd-empty.sh')
-rwxr-xr-xt/t2501-cwd-empty.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t2501-cwd-empty.sh b/t/t2501-cwd-empty.sh
index 5af1fec6fe..e4502d24d5 100755
--- a/t/t2501-cwd-empty.sh
+++ b/t/t2501-cwd-empty.sh
@@ -109,7 +109,7 @@ test_required_dir_removal () {
}
test_expect_success 'checkout does not clean cwd incidentally' '
- test_incidental_dir_removal failure git checkout init
+ test_incidental_dir_removal success git checkout init
'
test_expect_success 'checkout fails if cwd needs to be removed' '
@@ -117,7 +117,7 @@ test_expect_success 'checkout fails if cwd needs to be removed' '
'
test_expect_success 'reset --hard does not clean cwd incidentally' '
- test_incidental_dir_removal failure git reset --hard init
+ test_incidental_dir_removal success git reset --hard init
'
test_expect_success 'reset --hard fails if cwd needs to be removed' '
@@ -125,7 +125,7 @@ test_expect_success 'reset --hard fails if cwd needs to be removed' '
'
test_expect_success 'merge does not clean cwd incidentally' '
- test_incidental_dir_removal failure git merge reverted
+ test_incidental_dir_removal success git merge reverted
'
# This file uses some simple merges where
@@ -158,7 +158,7 @@ test_expect_success 'merge fails if cwd needs to be removed' '
'
test_expect_success 'cherry-pick does not clean cwd incidentally' '
- test_incidental_dir_removal failure git cherry-pick reverted
+ test_incidental_dir_removal success git cherry-pick reverted
'
test_expect_success 'cherry-pick fails if cwd needs to be removed' '
@@ -174,7 +174,7 @@ test_expect_success 'rebase fails if cwd needs to be removed' '
'
test_expect_success 'revert does not clean cwd incidentally' '
- test_incidental_dir_removal failure git revert HEAD
+ test_incidental_dir_removal success git revert HEAD
'
test_expect_success 'revert fails if cwd needs to be removed' '