From b170479336afa1577c70db5d9c9a8c0c86441245 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Mon, 11 Mar 2019 14:15:44 -0400 Subject: libs/git: Clean up after patch fails to apply A patch failing to apply shouldn't leave the repository in such a state where manual intervention is necessary to reset it. --- libs/git | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/git b/libs/git index 1ca2358e..03df3537 100755 --- a/libs/git +++ b/libs/git @@ -179,7 +179,8 @@ git_patch() { cd "$repository_path" git checkout "$branch" 2> /dev/null > /dev/null - git am "$patch" + + git am "$patch" || git am --abort ) } -- cgit v1.2.3-70-g09d2