mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Merge 9f51902915
into 76ce3defea
This commit is contained in:
commit
e970a3def2
10
yadm
10
yadm
@ -769,6 +769,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
|
||||||
@ -783,7 +784,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)
|
||||||
@ -850,6 +854,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