summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorCasey Fitzpatrick <kcghost@gmail.com>2018-05-03 10:53:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-22 03:17:10 (GMT)
commit6d33e1c28210bacf2e664b55b2feb255991e0ad5 (patch)
tree09415cd43459a46f96a9e8487ccbdc007ec3f232 /git-submodule.sh
parentc7199e3abe0280945ef1bd65abfc48321090edb6 (diff)
downloadgit-6d33e1c28210bacf2e664b55b2feb255991e0ad5.zip
git-6d33e1c28210bacf2e664b55b2feb255991e0ad5.tar.gz
git-6d33e1c28210bacf2e664b55b2feb255991e0ad5.tar.bz2
submodule: add --progress option to add command
The '--progress' was introduced in 72c5f88311d (clone: pass --progress decision to recursive submodules, 2016-09-22) to fix the progress reporting of the clone command. Also add the progress option to the 'submodule add' command. The update command already supports the progress flag, but it is not documented. Signed-off-by: Casey Fitzpatrick <kcghost@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 2625479..39c241a 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -117,6 +117,9 @@ cmd_add()
-q|--quiet)
GIT_QUIET=1
;;
+ --progress)
+ progress=1
+ ;;
--reference)
case "$2" in '') usage ;; esac
reference_path=$2
@@ -255,7 +258,7 @@ or you are unsure what this means choose another name with the '--name' option."
eval_gettextln "Reactivating local git directory for submodule '\$sm_name'."
fi
fi
- git submodule--helper clone ${GIT_QUIET:+--quiet} --prefix "$wt_prefix" --path "$sm_path" --name "$sm_name" --url "$realrepo" ${reference:+"$reference"} ${depth:+"$depth"} || exit
+ git submodule--helper clone ${GIT_QUIET:+--quiet} ${progress:+"--progress"} --prefix "$wt_prefix" --path "$sm_path" --name "$sm_name" --url "$realrepo" ${reference:+"$reference"} ${depth:+"$depth"} || exit
(
sanitize_submodule_env
cd "$sm_path" &&