This commit is contained in:
cwarlich 2023-01-28 08:29:08 -03:00 committed by GitHub
commit d2e86658e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

10
yadm
View File

@ -769,6 +769,7 @@ function clone() {
DO_BOOTSTRAP=1
local -a args
local -i do_checkout=1
local -i do_submodules=0
while [[ $# -gt 0 ]] ; do
case "$1" in
--bootstrap) # force bootstrap, without prompt
@ -783,7 +784,10 @@ function clone() {
-n|--no-checkout)
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
;;
--separate-git-dir)
@ -850,6 +854,10 @@ function clone() {
"$GIT_PROGRAM" checkout -- ":/$file"
done
if [[ $do_submodules -ne 0 ]]; then
"$GIT_PROGRAM" submodule update --init --recursive
fi
if [ -n "$("$GIT_PROGRAM" ls-files --modified)" ]; then
local msg
IFS='' read -r -d '' msg <<EOF