зеркало из https://github.com/microsoft/git.git
Merge branch 'ph/maint-submodule-status-fix'
Cleans up some leftover bits from an earlier submodule change. * ph/maint-submodule-status-fix: submodule status: remove unused orig_* variables t7407: Fix recursive submodule test
This commit is contained in:
Коммит
b0b00a3ee4
|
@ -950,7 +950,6 @@ cmd_summary() {
|
|||
cmd_status()
|
||||
{
|
||||
# parse $args after "submodule ... status".
|
||||
orig_flags=
|
||||
while test $# -ne 0
|
||||
do
|
||||
case "$1" in
|
||||
|
@ -974,7 +973,6 @@ cmd_status()
|
|||
break
|
||||
;;
|
||||
esac
|
||||
orig_flags="$orig_flags $(git rev-parse --sq-quote "$1")"
|
||||
shift
|
||||
done
|
||||
|
||||
|
@ -1014,7 +1012,7 @@ cmd_status()
|
|||
prefix="$displaypath/"
|
||||
clear_local_git_env
|
||||
cd "$sm_path" &&
|
||||
eval cmd_status "$orig_args"
|
||||
eval cmd_status
|
||||
) ||
|
||||
die "$(eval_gettext "Failed to recurse into submodule path '\$sm_path'")"
|
||||
fi
|
||||
|
|
|
@ -226,14 +226,14 @@ test_expect_success 'test "status --recursive"' '
|
|||
test_cmp expect actual
|
||||
'
|
||||
|
||||
sed -e "/nested1 /s/.*/+$nested1sha1 nested1 (file2~1)/;/sub[1-3]/d" < expect > expect2
|
||||
sed -e "/nested2 /s/.*/+$nested2sha1 nested1\/nested2 (file2~1)/;/sub[1-3]/d" < expect > expect2
|
||||
mv -f expect2 expect
|
||||
|
||||
test_expect_success 'ensure "status --cached --recursive" preserves the --cached flag' '
|
||||
(
|
||||
cd clone3 &&
|
||||
(
|
||||
cd nested1 &&
|
||||
cd nested1/nested2 &&
|
||||
test_commit file2
|
||||
) &&
|
||||
git submodule status --cached --recursive -- nested1 > ../actual
|
||||
|
|
Загрузка…
Ссылка в новой задаче