diff options
Diffstat (limited to 'git-commit.sh')
-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 9f49651cfd..d7f3ade493 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -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 | |