Skip to content

commitgraph throws err 500 when commit message contains a pipe #1189

Closed
@philfry

Description

@philfry
[...uters/repo/commit.go:92 Graph()] [E] GetCommitGraph: Failed parsing grap line:* DATA:||... - Should containt 8 datafields

Description

steps to reproduce:

touch dummyfile
git add dummyfile
git commit -m "this is a testcommit | containing a pipe"
git push
# view commitgraph

In models/graph.go in GetCommitGraph(r *git.Repository) (GraphItems, error) calls a git log and uses a custom format using pipes as field separators. Later in graphItemFromString(s string, r *git.Repository) (GraphItem, error) the lines get split by that delimiter and the resulting array is being checked whether or not it has exactly 8 elements.
The easiest solution would be to check whether or not the array has at least 8 elements and merge the 8th to nth elements together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions