Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-22 19:30:38 +0400
committerJunio C Hamano <gitster@pobox.com>2010-06-22 19:30:38 +0400
commit21919d396a3a05ccb8d6b538b246500f01585bb7 (patch)
tree0b7d4710abcdb0b637557808064cd40bc3b72da6 /builtin
parente0ae1e6f4d53c68bd219385f6f309c033d0fc673 (diff)
parent25755e842f814751fbdb7abfc8255a40f24bfaa3 (diff)
Merge branch 'pc/remove-warn' into maint
* pc/remove-warn: Remove a redundant errno test in a usage of remove_path Introduce remove_or_warn function Implement the rmdir_or_warn function Generalise the unlink_or_warn function
Diffstat (limited to 'builtin')
-rw-r--r--builtin/apply.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index f669157b42..59bbcdb132 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -3141,11 +3141,7 @@ static void remove_file(struct patch *patch, int rmdir_empty)
die("unable to remove %s from index", patch->old_name);
}
if (!cached) {
- if (S_ISGITLINK(patch->old_mode)) {
- if (rmdir(patch->old_name))
- warning("unable to remove submodule %s",
- patch->old_name);
- } else if (!unlink_or_warn(patch->old_name) && rmdir_empty) {
+ if (!remove_or_warn(patch->old_mode, patch->old_name) && rmdir_empty) {
remove_path(patch->old_name);
}
}