Skip to content

Commit

Permalink
Merge branch 'rs/submodule-summary-limit' into maint
Browse files Browse the repository at this point in the history
"submodule summary --summary-limit" option did not support
"--option=value" form.

* rs/submodule-summary-limit:
  submodule summary: support --summary-limit=<n>
  • Loading branch information
Junio C Hamano committed Apr 4, 2013
2 parents 5ccb7e2 + 862ae6c commit 8ce0ab4
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ module_clone()
(clear_local_git_env; cd "$sm_path" && GIT_WORK_TREE=. git config core.worktree "$rel/$b")
}

isnumber()
{
n=$(($1 + 0)) 2>/dev/null && test "$n" = "$1"
}

#
# Add a new submodule to the working tree, .gitmodules and the index
#
Expand Down Expand Up @@ -814,14 +819,14 @@ cmd_summary() {
for_status="$1"
;;
-n|--summary-limit)
if summary_limit=$(($2 + 0)) 2>/dev/null && test "$summary_limit" = "$2"
then
:
else
usage
fi
summary_limit="$2"
isnumber "$summary_limit" || usage
shift
;;
--summary-limit=*)
summary_limit="${1#--summary-limit=}"
isnumber "$summary_limit" || usage
;;
--)
shift
break
Expand Down

0 comments on commit 8ce0ab4

Please sign in to comment.