]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule: submodule_move_head omits old argument in forced case
authorStefan Beller <sbeller@google.com>
Fri, 5 Jan 2018 20:03:04 +0000 (12:03 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Jan 2018 20:35:35 +0000 (12:35 -0800)
commit7dcc1f4df8c74ec43d9b3e8c97aa985c2663b467
tree34cf3bc69af82512426e5b7322d2ed6d87d33f18
parentad17312e1170715a15651b3185dae9ebc6b6b8ef
submodule: submodule_move_head omits old argument in forced case

When using hard reset or forced checkout with the option to recurse into
submodules, the submodules need to be reset, too.

It turns out that we need to omit the duplicate old argument to read-tree
in all forced cases to omit the 2 way merge and use the more assertive
behavior of reading the specific new tree into the index and updating
the working tree.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c
t/lib-submodule-update.sh