diff options
-rwxr-xr-x | git-commit.sh | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/git-commit.sh b/git-commit.sh index e74fe640b8..128db6c52a 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -693,13 +693,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 | |