зеркало из https://github.com/microsoft/git.git
git-fetch: exit with non-zero status when fast-forward check fails
When update_local_ref() refuses to update a branch head due to fast-forward check, it was not propagated properly in the call chain and the command did not exit with non-zero status as a result. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
d25c26e771
Коммит
f64d7fd267
11
git-fetch.sh
11
git-fetch.sh
|
@ -359,7 +359,7 @@ fetch_main () {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
append_fetch_head "$head" "$remote" \
|
append_fetch_head "$head" "$remote" \
|
||||||
"$remote_name" "$remote_nick" "$local_name" "$not_for_merge"
|
"$remote_name" "$remote_nick" "$local_name" "$not_for_merge" || exit
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -413,15 +413,16 @@ fetch_main () {
|
||||||
done
|
done
|
||||||
local_name=$(expr "z$found" : 'z[^:]*:\(.*\)')
|
local_name=$(expr "z$found" : 'z[^:]*:\(.*\)')
|
||||||
append_fetch_head "$sha1" "$remote" \
|
append_fetch_head "$sha1" "$remote" \
|
||||||
"$remote_name" "$remote_nick" "$local_name" "$not_for_merge"
|
"$remote_name" "$remote_nick" "$local_name" \
|
||||||
done
|
"$not_for_merge" || exit
|
||||||
|
done &&
|
||||||
if [ "$pack_lockfile" ]; then rm -f "$pack_lockfile"; fi
|
if [ "$pack_lockfile" ]; then rm -f "$pack_lockfile"; fi
|
||||||
) || exit ;;
|
) || exit ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch_main "$reflist"
|
fetch_main "$reflist" || exit
|
||||||
|
|
||||||
# automated tag following
|
# automated tag following
|
||||||
case "$no_tags$tags" in
|
case "$no_tags$tags" in
|
||||||
|
@ -449,7 +450,7 @@ case "$no_tags$tags" in
|
||||||
case "$taglist" in
|
case "$taglist" in
|
||||||
'') ;;
|
'') ;;
|
||||||
?*)
|
?*)
|
||||||
fetch_main "$taglist" ;;
|
fetch_main "$taglist" || exit ;;
|
||||||
esac
|
esac
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче