summaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-06-26 14:36:10 -0700
committerJunio C Hamano <junkio@cox.net>2006-06-26 14:36:10 -0700
commit1ef9e05dbf36a80bb65fb150dd7bdd60852db777 (patch)
tree319b38fbc0efc75d216bacccbeb53cc3ed42e50f /git-commit.sh
parent6a0dbb8a5c41770c2280de15c3202970c6515ccc (diff)
parent7d0c68871a86df0654454df047458836afa13129 (diff)
downloadgit-1ef9e05dbf36a80bb65fb150dd7bdd60852db777.tar.gz
Merge branch 'jc/squash'
* jc/squash: git-merge --squash
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 128db6c52a..d7f3ade493 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -566,6 +566,9 @@ then
elif test -f "$GIT_DIR/MERGE_HEAD" && test -f "$GIT_DIR/MERGE_MSG"
then
cat "$GIT_DIR/MERGE_MSG"
+elif test -f "$GIT_DIR/SQUASH_MSG"
+then
+ cat "$GIT_DIR/SQUASH_MSG"
fi | git-stripspace >"$GIT_DIR"/COMMIT_EDITMSG
case "$signoff" in
@@ -663,7 +666,7 @@ else
fi
if [ "$?" != "0" -a ! -f "$GIT_DIR/MERGE_HEAD" -a -z "$amend" ]
then
- rm -f "$GIT_DIR/COMMIT_EDITMSG"
+ rm -f "$GIT_DIR/COMMIT_EDITMSG" "$GIT_DIR/SQUASH_MSG"
run_status
exit 1
fi
@@ -734,7 +737,7 @@ else
false
fi
ret="$?"
-rm -f "$GIT_DIR/COMMIT_MSG" "$GIT_DIR/COMMIT_EDITMSG"
+rm -f "$GIT_DIR/COMMIT_MSG" "$GIT_DIR/COMMIT_EDITMSG" "$GIT_DIR/SQUASH_MSG"
if test -d "$GIT_DIR/rr-cache"
then
git-rerere