From 07d5ee82fff84fb75f31ea0f840068d85b70c23e Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Sat, 4 Feb 2012 13:59:07 -0800 Subject: [PATCH] fixed git-squash --- bin/git-squash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/git-squash b/bin/git-squash index 71fc7ed..98ab229 100755 --- a/bin/git-squash +++ b/bin/git-squash @@ -5,8 +5,8 @@ msg=$2 test -z $src && echo "source branch required." && exit 1 -git merge --squash $src && git branch -d $src +git merge --squash $src -if test -n $msg - git commit -a -m "$msg" -fi \ No newline at end of file +if test -n "$msg"; then + git commit -a -m "$msg" && git branch -D $src +fi