Make fetch/pull scripts terminate cleanly on errors

Don't continue with a merge if the fetch failed.
This commit is contained in:
Linus Torvalds 2005-06-06 17:40:22 -07:00
parent 3f4eff7530
commit ed37b5b2b9
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ download_objects () {
}
echo "Getting remote $merge_name"
download_one "$merge_repo/$merge_name" "$GIT_DIR"/MERGE_HEAD
download_one "$merge_repo/$merge_name" "$GIT_DIR"/MERGE_HEAD || exit 1
echo "Getting object database"
download_objects "$merge_repo" "$(cat "$GIT_DIR"/MERGE_HEAD)"
download_objects "$merge_repo" "$(cat "$GIT_DIR"/MERGE_HEAD)" || exit 1

View File

@ -15,7 +15,7 @@ fi
: ${GIT_DIR=.git}
: ${GIT_OBJECT_DIRECTORY="${SHA1_FILE_DIRECTORY-"$GIT_DIR/objects"}"}
git-fetch-script "$merge_repo" "$merge_head"
git-fetch-script "$merge_repo" "$merge_head" || exit 1
git-resolve-script \
"$(cat "$GIT_DIR"/HEAD)" \