Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
submodule summary: support --summary-limit=<n>
author
René Scharfe
<rene.scharfe@lsrfire.ath.cx>
Mon, 1 Apr 2013 13:06:27 +0000
(15:06 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 1 Apr 2013 14:37:34 +0000
(07:37 -0700)
In addition to "--summary-limit <n>" support the form "--summary-limit=<n>",
for consistency with other parameters and commands.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-submodule.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
803a777
)
diff --git
a/git-submodule.sh
b/git-submodule.sh
index ab29bfeb738d1b8f452c558ba6f6d7aa4e854b3d..b3108b8ea9983c524eb06831972c22773b3a56b1 100755
(executable)
--- a/
git-submodule.sh
+++ b/
git-submodule.sh
@@
-266,6
+266,11
@@
module_clone()
(clear_local_git_env; cd "$sm_path" && GIT_WORK_TREE=. git config core.worktree "$rel/$b")
}
(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
#
#
# Add a new submodule to the working tree, .gitmodules and the index
#
@@
-814,14
+819,14
@@
cmd_summary() {
for_status="$1"
;;
-n|--summary-limit)
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
;;
shift
;;
+ --summary-limit=*)
+ summary_limit="${1#--summary-limit=}"
+ isnumber "$summary_limit" || usage
+ ;;
--)
shift
break
--)
shift
break