Sync with 1.8.4.5

This commit is contained in:
Junio C Hamano
2013-12-02 15:34:44 -08:00
4 changed files with 45 additions and 6 deletions

View File

@ -612,11 +612,21 @@ cmd_init()
fi
# Copy "update" setting when it is not set yet
upd="$(git config -f .gitmodules submodule."$name".update)"
test -z "$upd" ||
test -n "$(git config submodule."$name".update)" ||
git config submodule."$name".update "$upd" ||
die "$(eval_gettext "Failed to register update mode for submodule path '\$displaypath'")"
if upd="$(git config -f .gitmodules submodule."$name".update)" &&
test -n "$upd" &&
test -z "$(git config submodule."$name".update)"
then
case "$upd" in
rebase | merge | none)
;; # known modes of updating
*)
echo >&2 "warning: unknown update mode '$upd' suggested for submodule '$name'"
upd=none
;;
esac
git config submodule."$name".update "$upd" ||
die "$(eval_gettext "Failed to register update mode for submodule path '\$displaypath'")"
fi
done
}