summaryrefslogtreecommitdiff
path: root/t/t9133-git-svn-nested-git-repo.sh
diff options
context:
space:
mode:
authorShaoxuan Yuan <shaoxuan.yuan02@gmail.com>2022-06-30 10:37:37 +0800
committerJunio C Hamano <gitster@pobox.com>2022-07-01 14:50:16 -0700
commitb91a2b6594a1da7d4d2f936f7db25bfa5a3d775e (patch)
treea5f8f4c59962739e6dc3cf784fe4cebafae4fbc8 /t/t9133-git-svn-nested-git-repo.sh
parent24ea81d9ac401731c222b28097b339aa0d2d316d (diff)
mv: add check_dir_in_index() and solve general dir check issue
Originally, moving a <source> directory which is not on-disk due to its existence outside of sparse-checkout cone, "giv mv" command errors out with "bad source". Add a helper check_dir_in_index() function to see if a directory name exists in the index. Also add a SKIP_WORKTREE_DIR bit to mark such directories. Change the checking logic, so that such <source> directory makes "giv mv" command warns with "advise_on_updating_sparse_paths()" instead of "bad source"; also user now can supply a "--sparse" flag so this operation can be carried out successfully. Helped-by: Victoria Dye <vdye@github.com> Helped-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com> Acked-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9133-git-svn-nested-git-repo.sh')
0 files changed, 0 insertions, 0 deletions