summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-commit.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/git-commit.sh b/git-commit.sh
index e74fe64..128db6c 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 |