Skip to content

Commit b0b00a3

Browse files
committed
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
2 parents 19fb613 + e15bec0 commit b0b00a3

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

git-submodule.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,6 @@ cmd_summary() {
950950
cmd_status()
951951
{
952952
# parse $args after "submodule ... status".
953-
orig_flags=
954953
while test $# -ne 0
955954
do
956955
case "$1" in
@@ -974,7 +973,6 @@ cmd_status()
974973
break
975974
;;
976975
esac
977-
orig_flags="$orig_flags $(git rev-parse --sq-quote "$1")"
978976
shift
979977
done
980978

@@ -1014,7 +1012,7 @@ cmd_status()
10141012
prefix="$displaypath/"
10151013
clear_local_git_env
10161014
cd "$sm_path" &&
1017-
eval cmd_status "$orig_args"
1015+
eval cmd_status
10181016
) ||
10191017
die "$(eval_gettext "Failed to recurse into submodule path '\$sm_path'")"
10201018
fi

t/t7407-submodule-foreach.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ test_expect_success 'test "status --recursive"' '
226226
test_cmp expect actual
227227
'
228228

229-
sed -e "/nested1 /s/.*/+$nested1sha1 nested1 (file2~1)/;/sub[1-3]/d" < expect > expect2
229+
sed -e "/nested2 /s/.*/+$nested2sha1 nested1\/nested2 (file2~1)/;/sub[1-3]/d" < expect > expect2
230230
mv -f expect2 expect
231231

232232
test_expect_success 'ensure "status --cached --recursive" preserves the --cached flag' '
233233
(
234234
cd clone3 &&
235235
(
236-
cd nested1 &&
236+
cd nested1/nested2 &&
237237
test_commit file2
238238
) &&
239239
git submodule status --cached --recursive -- nested1 > ../actual

0 commit comments

Comments
 (0)