{"thread":{"id":"59509","subject":"[PATCH 2/2] t2107: fix mention of the_index.cache_changed","startedAt":"2023-03-31T14:36:12Z","lastAt":"2023-03-31T14:36:13Z","messageCount":2,"participants":["Andrei Rybak"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"474505","messageId":"20230331143604.82040-2-rybak.a.v@gmail.com","threadId":"59509","inReplyTo":"20230331143604.82040-1-rybak.a.v@gmail.com","subject":"[PATCH 2/2] t2107: fix mention of the_index.cache_changed","fromName":"Andrei Rybak","fromEmail":"rybak.a.v@gmail.com","sentAt":"2023-03-31T14:36:04Z","receivedAt":"2023-03-31T14:36:12Z","isPatch":true,"sender":{"key":"rybak.a.v@gmail.com","avatar":"https://avatars.githubusercontent.com/u/624072?v=4"},"body":"Commit [1] added a test to t2107-update-index-basic.sh with a comment\nthat mentions macro \"active_cache_changed\".  Later in [2], the macro was\nremoved and its usage in function cmd_update_index in file\nbuiltin/update-index.c was replaced with \"the_index.cache_changed\".\n\nFix the outdated comment in file t2107-update-index-basic.sh.\n\n[1] fa137f67a4 (lockfile.c: store absolute path, 2014-11-02)\n[2] dc594180d9 (cocci & cache.h: apply variable section of \"pending\"\n    index-compatibility, 2022-11-19)\n\nSigned-off-by: Andrei Rybak <rybak.a.v@gmail.com>\n---\n t/t2107-update-index-basic.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\nFound this by while investigating the root cause for the first patch in this\nseries.\n\ndiff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh\nindex 07e6de84e6..89b285fa3a 100755\n--- a/t/t2107-update-index-basic.sh\n+++ b/t/t2107-update-index-basic.sh\n@@ -83,7 +83,7 @@ test_expect_success '.lock files cleaned up' '\n \tcd repo &&\n \tgit config core.worktree ../../worktree &&\n \t# --refresh triggers late setup_work_tree,\n-\t# active_cache_changed is zero, rollback_lock_file fails\n+\t# the_index.cache_changed is zero, rollback_lock_file fails\n \tgit update-index --refresh --verbose >out &&\n \ttest_must_be_empty out &&\n \t! test -f .git/index.lock\n-- \n2.40.0\n\n"},{"id":"474506","messageId":"20230331143604.82040-1-rybak.a.v@gmail.com","threadId":"59509","inReplyTo":null,"subject":"[PATCH 1/2] t3060: fix mention of function prune_index","fromName":"Andrei Rybak","fromEmail":"rybak.a.v@gmail.com","sentAt":"2023-03-31T14:36:03Z","receivedAt":"2023-03-31T14:36:13Z","isPatch":true,"sender":{"key":"rybak.a.v@gmail.com","avatar":"https://avatars.githubusercontent.com/u/624072?v=4"},"body":"Commit [1] added tests which trigger function prune_cache.  The comments\nin these tests, however, incorrectly call it \"prune_path\".  Since then,\nfunction \"prune_cache\" has been renamed to \"prune_index\" in commit [2].\nLater still in commit [3], the_index singleton, which is also mentioned\nin a comment, stopped being used directly with function \"prune_index\".\n\nFix mentions of function \"prune_index\" and the struct it changes in\ncomments in file \"t3060-ls-files-with-tree.sh\".\n\n[1] 54e1abce90 (Add test case for ls-files --with-tree, 2007-10-03)\n[2] 6510ae173a (ls-files: convert prune_cache to take an index,\n    2017-06-12)\n[3] 188dce131f (ls-files: use repository object, 2017-06-22)\n\nSigned-off-by: Andrei Rybak <rybak.a.v@gmail.com>\n---\n\nFound this by accident while working on an unrelated topic.\n\n t/t3060-ls-files-with-tree.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t3060-ls-files-with-tree.sh b/t/t3060-ls-files-with-tree.sh\nindex c4a72ae446..5a06732ca7 100755\n--- a/t/t3060-ls-files-with-tree.sh\n+++ b/t/t3060-ls-files-with-tree.sh\n@@ -40,7 +40,7 @@ test_expect_success 'setup' '\n \tgit commit -a -m \"remove them all\" &&\n \n \t# The bug also requires some entry before our directory so that\n-\t# prune_path will modify the_index.cache\n+\t# prune_index will modify the_repository->index.cache\n \n \tmkdir a_directory_that_sorts_before_sub &&\n \t>a_directory_that_sorts_before_sub/file &&\n@@ -56,7 +56,7 @@ test_expect_success 'usage' '\n '\n \n test_expect_success 'git ls-files --with-tree should succeed from subdir' '\n-\t# We have to run from a sub-directory to trigger prune_path\n+\t# We have to run from a sub-directory to trigger prune_index\n \t# Then we finally get to run our --with-tree test\n \t(\n \t\tcd sub &&\n-- \n2.40.0\n\n"}]}