Skip to content

Commit

Permalink
submodule status: remove unused orig_* variables
Browse files Browse the repository at this point in the history
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 <hordp@cisco.com>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Jeff King <peff@peff.net>
  • Loading branch information
Jens Lehmann authored and Jeff King committed Oct 29, 2012
1 parent 58ca9ad commit e15bec0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,6 @@ cmd_summary() {
cmd_status()
{
# parse $args after "submodule ... status".
orig_flags=
while test $# -ne 0
do
case "$1" in
Expand All @@ -950,7 +949,6 @@ cmd_status()
break
;;
esac
orig_flags="$orig_flags $(git rev-parse --sq-quote "$1")"
shift
done

Expand Down Expand Up @@ -990,7 +988,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

0 comments on commit e15bec0

Please sign in to comment.