summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-07-14 22:04:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-07-14 22:04:00 (GMT)
commit361cbe6d6d24142d4b773f4077c07e25687680d6 (patch)
tree4049494bd9180d33fd8a38141850c4a9aeb8495f /contrib
parent0455aad1e39f21acbaa8a84129fec8eb77682e0d (diff)
parent5b893f7d81eb7feb43662ed8663e2af76a76b4c8 (diff)
downloadgit-361cbe6d6d24142d4b773f4077c07e25687680d6.zip
git-361cbe6d6d24142d4b773f4077c07e25687680d6.tar.gz
git-361cbe6d6d24142d4b773f4077c07e25687680d6.tar.bz2
Merge branch 'ab/submodule-cleanup'
Further preparation to turn git-submodule.sh into a builtin. * ab/submodule-cleanup: git-sh-setup.sh: remove "say" function, change last users git-submodule.sh: use "$quiet", not "$GIT_QUIET" submodule--helper: eliminate internal "--update" option submodule--helper: understand --checkout, --merge and --rebase synonyms submodule--helper: report "submodule" as our name in some "-h" output submodule--helper: rename "absorb-git-dirs" to "absorbgitdirs" submodule update: remove "-v" option submodule--helper: have --require-init imply --init git-submodule.sh: remove unused top-level "--branch" argument git-submodule.sh: make the "$cached" variable a boolean git-submodule.sh: remove unused $prefix variable git-submodule.sh: remove unused sanitize_submodule_env()
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/subtree/git-subtree.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 1af1d96..7562a39 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -50,6 +50,14 @@ m,message= use the given message as the commit message for the merge commit
indent=0
+# Usage: say [MSG...]
+say () {
+ if test -z "$arg_quiet"
+ then
+ printf '%s\n' "$*"
+ fi
+}
+
# Usage: debug [MSG...]
debug () {
if test -n "$arg_debug"
@@ -60,7 +68,7 @@ debug () {
# Usage: progress [MSG...]
progress () {
- if test -z "$GIT_QUIET"
+ if test -z "$arg_quiet"
then
if test -z "$arg_debug"
then
@@ -146,6 +154,7 @@ main () {
eval "$set_args"
# Begin "real" flag parsing.
+ arg_quiet=
arg_debug=
arg_prefix=
arg_split_branch=
@@ -161,7 +170,7 @@ main () {
case "$opt" in
-q)
- GIT_QUIET=1
+ arg_quiet=1
;;
-d)
arg_debug=1
@@ -252,7 +261,7 @@ main () {
dir="$(dirname "$arg_prefix/.")"
debug "command: {$arg_command}"
- debug "quiet: {$GIT_QUIET}"
+ debug "quiet: {$arg_quiet}"
debug "dir: {$dir}"
debug "opts: {$*}"
debug