From f8b20d58546efddf77d1e4b78a46000958ab9fdb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 31 Oct 2012 08:18:02 +0100 Subject: [PATCH] skip unecessary merge in dist process Signed-off-by: Nico Schottelius --- build | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/build b/build index a4550f67..0af286f8 100755 --- a/build +++ b/build @@ -168,12 +168,16 @@ notes target_branch=${version%\.*} current_branch=$(git rev-parse --abbrev-ref HEAD) - printf "Press enter to git merge $current_branch into \"$target_branch\" > " - read prompt - git checkout "$target_branch" - git merge "$current_branch" - git checkout "$current_branch" - ;; + if [ "$target_branch" = "$current_branch" ]; then + echo "Skipping merge, already on destination branch" + else + printf "Press enter to git merge $current_branch into \"$target_branch\" > " + read prompt + git checkout "$target_branch" + git merge "$current_branch" + git checkout "$current_branch" + fi + ;; dist-archlinux) ./PKGBUILD.in