* [PATCH 1/2] t3060: fix mention of function prune_index
@ 2023-03-31 14:36 Andrei Rybak
2023-03-31 14:36 ` [PATCH 2/2] t2107: fix mention of the_index.cache_changed Andrei Rybak
0 siblings, 1 reply; 2+ messages in thread
From: Andrei Rybak @ 2023-03-31 14:36 UTC (permalink / raw)
To: git; +Cc: Brandon Williams, Carl Worth, Ævar Arnfjörð Bjarmason
Commit [1] added tests which trigger function prune_cache. The comments
in these tests, however, incorrectly call it "prune_path". Since then,
function "prune_cache" has been renamed to "prune_index" in commit [2].
Later still in commit [3], the_index singleton, which is also mentioned
in a comment, stopped being used directly with function "prune_index".
Fix mentions of function "prune_index" and the struct it changes in
comments in file "t3060-ls-files-with-tree.sh".
[1] 54e1abce90 (Add test case for ls-files --with-tree, 2007-10-03)
[2] 6510ae173a (ls-files: convert prune_cache to take an index,
2017-06-12)
[3] 188dce131f (ls-files: use repository object, 2017-06-22)
Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
---
Found this by accident while working on an unrelated topic.
t/t3060-ls-files-with-tree.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t3060-ls-files-with-tree.sh b/t/t3060-ls-files-with-tree.sh
index c4a72ae446..5a06732ca7 100755
--- a/t/t3060-ls-files-with-tree.sh
+++ b/t/t3060-ls-files-with-tree.sh
@@ -40,7 +40,7 @@ test_expect_success 'setup' '
git commit -a -m "remove them all" &&
# The bug also requires some entry before our directory so that
- # prune_path will modify the_index.cache
+ # prune_index will modify the_repository->index.cache
mkdir a_directory_that_sorts_before_sub &&
>a_directory_that_sorts_before_sub/file &&
@@ -56,7 +56,7 @@ test_expect_success 'usage' '
'
test_expect_success 'git ls-files --with-tree should succeed from subdir' '
- # We have to run from a sub-directory to trigger prune_path
+ # We have to run from a sub-directory to trigger prune_index
# Then we finally get to run our --with-tree test
(
cd sub &&
--
2.40.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] t2107: fix mention of the_index.cache_changed
2023-03-31 14:36 [PATCH 1/2] t3060: fix mention of function prune_index Andrei Rybak
@ 2023-03-31 14:36 ` Andrei Rybak
0 siblings, 0 replies; 2+ messages in thread
From: Andrei Rybak @ 2023-03-31 14:36 UTC (permalink / raw)
To: git; +Cc: Brandon Williams, Carl Worth, Ævar Arnfjörð Bjarmason
Commit [1] added a test to t2107-update-index-basic.sh with a comment
that mentions macro "active_cache_changed". Later in [2], the macro was
removed and its usage in function cmd_update_index in file
builtin/update-index.c was replaced with "the_index.cache_changed".
Fix the outdated comment in file t2107-update-index-basic.sh.
[1] fa137f67a4 (lockfile.c: store absolute path, 2014-11-02)
[2] dc594180d9 (cocci & cache.h: apply variable section of "pending"
index-compatibility, 2022-11-19)
Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
---
t/t2107-update-index-basic.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Found this by while investigating the root cause for the first patch in this
series.
diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh
index 07e6de84e6..89b285fa3a 100755
--- a/t/t2107-update-index-basic.sh
+++ b/t/t2107-update-index-basic.sh
@@ -83,7 +83,7 @@ test_expect_success '.lock files cleaned up' '
cd repo &&
git config core.worktree ../../worktree &&
# --refresh triggers late setup_work_tree,
- # active_cache_changed is zero, rollback_lock_file fails
+ # the_index.cache_changed is zero, rollback_lock_file fails
git update-index --refresh --verbose >out &&
test_must_be_empty out &&
! test -f .git/index.lock
--
2.40.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-31 14:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-31 14:36 [PATCH 1/2] t3060: fix mention of function prune_index Andrei Rybak
2023-03-31 14:36 ` [PATCH 2/2] t2107: fix mention of the_index.cache_changed Andrei Rybak
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.