Skip to content

Commit

Permalink
Merge branch 'ph/maint-submodule-status-fix'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jeff King committed Nov 9, 2012
2 parents 19fb613 + e15bec0 commit b0b00a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,6 @@ cmd_summary() {
cmd_status()
{
# parse $args after "submodule ... status".
orig_flags=
while test $# -ne 0
do
case "$1" in
Expand All @@ -974,7 +973,6 @@ cmd_status()
break
;;
esac
orig_flags="$orig_flags $(git rev-parse --sq-quote "$1")"
shift
done

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions t/t7407-submodule-foreach.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0b00a3

Please sign in to comment.