aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorShaoxuan Yuan <shaoxuan.yuan02@gmail.com>2022-08-09 20:09:03 +0800
committerJunio C Hamano <gitster@pobox.com>2022-08-10 13:57:49 -0700
commit72e59ba19e776abbff7dccbf093c73e43527a339 (patch)
treeaa9f4df881a0438a4d56d9f6d6d7ab0f389e9213 /builtin/commit.c
parentt7002: add tests for moving from in-cone to out-of-cone (diff)
downloadgit-72e59ba19e776abbff7dccbf093c73e43527a339.tar.gz
git-72e59ba19e776abbff7dccbf093c73e43527a339.zip
mv: rename check_dir_in_index() to empty_dir_has_sparse_contents()
Method check_dir_in_index() introduced in b91a2b6594 (mv: add check_dir_in_index() and solve general dir check issue, 2022-06-30) does not describe its intent and behavior well. Change its name to empty_dir_has_sparse_contents(), which more precisely describes its purpose. Reverse the return values, check_dir_in_index() return 0 for success and 1 for failure; reverse the values so empty_dir_has_sparse_contents() return 1 for success and 0 for failure. These values are more intuitive because 1 usually means "has" and 0 means "not found". Also modify the documentation to better align with the method's intent and behavior. Helped-by: Derrick Stolee <derrickstolee@github.com> Helped-by: Victoria Dye <vdye@github.com> Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions