Implement safe_strncpy() as strlcpy() and use it more.
[gitweb.git] / git-commit.sh
index 15482d21b31dadaf53bf831be2de4d6f8b269b33..6dd04fd3675fd2559f983581a9d5f7eddee31e55 100755 (executable)
@@ -713,7 +713,8 @@ then
                rm -f "$TMP_INDEX"
        fi &&
        commit=$(cat "$GIT_DIR"/COMMIT_MSG | git-commit-tree $tree $PARENTS) &&
-       git-update-ref HEAD $commit $current &&
+       rlogm=$(sed -e 1q "$GIT_DIR"/COMMIT_MSG) &&
+       git-update-ref -m "commit: $rlogm" HEAD $commit $current &&
        rm -f -- "$GIT_DIR/MERGE_HEAD" &&
        if test -f "$NEXT_INDEX"
        then