summaryrefslogtreecommitdiff
path: root/credential.c
diff options
context:
space:
mode:
authorLibravatar Jens Lehmann <Jens.Lehmann@web.de>2012-09-30 01:05:58 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-29 21:49:11 -0700
commit73b0898d0d04d432525f9d56e29bf70fc7bf6ea9 (patch)
tree29633187baa2b1a42edf17639017440fcae391f4 /credential.c
parentUpdate draft release notes to 1.8.0 (diff)
downloadtgif-73b0898d0d04d432525f9d56e29bf70fc7bf6ea9.tar.xz
Teach "git submodule add" the --name option
"git submodule add" initializes the name of a submodule to its path. This was ok as long as the .git directory lived inside the submodule's work tree, but since 1.7.8 it is stored in the .git/modules/<name> directory of the superproject, making the submodule name survive the removal of the submodule's work tree. This leads to problems when the user tries to add a different submodule at the same path - and thus the same name - later, as that will happily try to restore the submodule from the old repository instead of the one the user specified and will lead to a checkout of the wrong repository. Add the new "--name" option to let the user provide a name for the submodule. This enables the user to solve this conflict without having to remove .git/modules/<name> by hand (which is no viable solution as it makes it impossible to checkout a commit that records the old submodule and populate it, as that will still check out the new submodule for the same reason). To achieve that the submodule's name is added to the parameter list of the module_clone() helper function. This makes it possible to remove the call of module_name() there because both callers of module_clone() already know the name and can provide it as argument number two. Reported-by: Jonathan Johnson <me@jondavidjohn.com> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'credential.c')
0 files changed, 0 insertions, 0 deletions