aboutsummaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 9f49651cf..d7f3ade49 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 |