From: Junio C Hamano Date: Mon, 26 Jun 2006 21:36:10 +0000 (-0700) Subject: Merge branch 'jc/squash' X-Git-Tag: v1.4.1-rc2~18 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1ef9e05dbf36a80bb65fb150dd7bdd60852db777?ds=inline;hp=-c Merge branch 'jc/squash' * jc/squash: git-merge --squash --- 1ef9e05dbf36a80bb65fb150dd7bdd60852db777 diff --combined git-commit.sh index 128db6c52a,9f49651cfd..d7f3ade493 --- a/git-commit.sh +++ b/git-commit.sh @@@ -566,6 -566,9 +566,9 @@@ the 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 +666,7 @@@ els 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 @@@ -693,18 -696,13 +696,18 @@@ t fi esac -sed -e ' - /^diff --git a\/.*/{ - s/// - q - } - /^#/d -' "$GIT_DIR"/COMMIT_EDITMSG | +if test -z "$no_edit" +then + sed -e ' + /^diff --git a\/.*/{ + s/// + q + } + /^#/d + ' "$GIT_DIR"/COMMIT_EDITMSG +else + cat "$GIT_DIR"/COMMIT_EDITMSG +fi | git-stripspace >"$GIT_DIR"/COMMIT_MSG if cnt=`grep -v -i '^Signed-off-by' "$GIT_DIR"/COMMIT_MSG | @@@ -734,7 -732,7 +737,7 @@@ els 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