Merge branch 'jl/submodule-deinit'

A finishing touch to the new topic in 1.8.3.

* jl/submodule-deinit:
  submodule deinit: clarify work tree removal message
This commit is contained in:
Junio C Hamano
2013-04-05 14:15:13 -07:00
2 changed files with 20 additions and 7 deletions

View File

@ -606,10 +606,12 @@ cmd_deinit()
if test -z "$force"
then
git rm -n "$sm_path" ||
git rm -qn "$sm_path" ||
die "$(eval_gettext "Submodule work tree '\$sm_path' contains local modifications; use '-f' to discard them")"
fi
rm -rf "$sm_path" || say "$(eval_gettext "Could not remove submodule work tree '\$sm_path'")"
rm -rf "$sm_path" &&
say "$(eval_gettext "Cleared directory '\$sm_path'")" ||
say "$(eval_gettext "Could not remove submodule work tree '\$sm_path'")"
fi
mkdir "$sm_path" || say "$(eval_gettext "Could not create empty submodule directory '\$sm_path'")"