mirror of
https://github.com/TheLocehiliosan/yadm
synced 2025-06-05 17:13:58 +00:00
Merge branch 'feature/recursive_clone' into feature/adwach13
This commit is contained in:
commit
2a28c43b64
10
yadm
10
yadm
@ -801,6 +801,7 @@ function clone() {
|
|||||||
DO_BOOTSTRAP=1
|
DO_BOOTSTRAP=1
|
||||||
local -a args
|
local -a args
|
||||||
local -i do_checkout=1
|
local -i do_checkout=1
|
||||||
|
local -i do_submodules=0
|
||||||
while [[ $# -gt 0 ]] ; do
|
while [[ $# -gt 0 ]] ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--bootstrap) # force bootstrap, without prompt
|
--bootstrap) # force bootstrap, without prompt
|
||||||
@ -815,7 +816,10 @@ function clone() {
|
|||||||
-n|--no-checkout)
|
-n|--no-checkout)
|
||||||
do_checkout=0
|
do_checkout=0
|
||||||
;;
|
;;
|
||||||
--bare|--mirror|--recurse-submodules*|--recursive|--separate-git-dir=*)
|
--recursive)
|
||||||
|
do_submodules=1
|
||||||
|
;;
|
||||||
|
--bare|--mirror|--recurse-submodules*|--separate-git-dir=*)
|
||||||
# ignore arguments without separate parameter
|
# ignore arguments without separate parameter
|
||||||
;;
|
;;
|
||||||
--separate-git-dir)
|
--separate-git-dir)
|
||||||
@ -880,6 +884,10 @@ function clone() {
|
|||||||
git_program checkout -- ":/$file"
|
git_program checkout -- ":/$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ $do_submodules -ne 0 ]]; then
|
||||||
|
git_program submodule update --init --recursive
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$(git_program ls-files --modified)" ]; then
|
if [ -n "$(git_program ls-files --modified)" ]; then
|
||||||
local msg
|
local msg
|
||||||
IFS='' read -r -d '' msg <<EOF
|
IFS='' read -r -d '' msg <<EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user