Skip to content

Commit e15bec0

Browse files
jlehmannpeff
authored andcommitted
submodule status: remove unused orig_* variables
When renaming orig_args to orig_flags in 98dbe63 (submodule: only preserve flags across recursive status/update invocations) the call site of the recursive cmd_status was forgotten. At that place orig_args is still passed into the recursion, which is always empty since then. This did not break anything because the orig_flags logic is not needed at all when a function from the submodule script is called with eval, as that inherits all the variables set by the option parsing done in the first level of the recursion. Now that we know that orig_flags and orig_args aren't needed at all, let's just remove them from cmd_status(). Thanks-to: Phil Hord <[email protected]> Signed-off-by: Jens Lehmann <[email protected]> Signed-off-by: Jeff King <[email protected]>
1 parent 58ca9ad commit e15bec0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

git-submodule.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,6 @@ cmd_summary() {
926926
cmd_status()
927927
{
928928
# parse $args after "submodule ... status".
929-
orig_flags=
930929
while test $# -ne 0
931930
do
932931
case "$1" in
@@ -950,7 +949,6 @@ cmd_status()
950949
break
951950
;;
952951
esac
953-
orig_flags="$orig_flags $(git rev-parse --sq-quote "$1")"
954952
shift
955953
done
956954

@@ -990,7 +988,7 @@ cmd_status()
990988
prefix="$displaypath/"
991989
clear_local_git_env
992990
cd "$sm_path" &&
993-
eval cmd_status "$orig_args"
991+
eval cmd_status
994992
) ||
995993
die "$(eval_gettext "Failed to recurse into submodule path '\$sm_path'")"
996994
fi

0 commit comments

Comments
 (0)