rebase: allow --skip to work with --merge
[gitweb.git] / git-commit.sh
index e74fe640b8acb87bef2cc118e87d8779c79f8786..128db6c52a878a421a67c658dfd175f774c24fea 100755 (executable)
@@ -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 |