mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Handle errors during git fetch origin
This commit is contained in:
parent
301b537f15
commit
bbec7dd540
6
yadm
6
yadm
@ -148,7 +148,11 @@ function clone() {
|
|||||||
|
|
||||||
#; fetch / merge (and possibly fallback to reset)
|
#; fetch / merge (and possibly fallback to reset)
|
||||||
debug "Doing an initial fetch of the origin"
|
debug "Doing an initial fetch of the origin"
|
||||||
git fetch origin
|
git fetch origin || {
|
||||||
|
debug "Removing repo after failed clone"
|
||||||
|
rm -rf "$YADM_REPO"
|
||||||
|
error_out "Unable to fetch origin $1"
|
||||||
|
}
|
||||||
debug "Doing an initial merge of origin/master"
|
debug "Doing an initial merge of origin/master"
|
||||||
git merge origin/master || {
|
git merge origin/master || {
|
||||||
debug "Merge failed, doing a reset."
|
debug "Merge failed, doing a reset."
|
||||||
|
Loading…
Reference in New Issue
Block a user