Mahendra Dani <danimahendra0904@xxxxxxxxx> writes: >> > remove_object() { >> > file=$(sha1_file "$*") && >> > - test -e "$file" && >> > + test_path_exists "$file" && >> > rm -f "$file" >> > } && >> >> The refactoring is true to the original spirit of the preimage indeed. >> But we could also improve it even further if we verified that the path >> not only exists, but exists and is a file via `test_path_is_file()`. If >> we decide to do that we should also explain the change in the commit >> message. > > Yes, sure. > I will improve it further using the `test_path_is_file()` helper > function and change the commit message in v2 patch. You may want to think about why there is "-f" there. If we remove it, do we still need to have any check there?