Multiple merges in single commit breaks commit graph #3486

Closed
opened 2025-11-02 05:14:33 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @eightfingers89 on GitHub (Jun 18, 2019).

  • Gitea version (or commit ref): 1.7.6
  • Git version:
  • Operating system: Centos
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When more that one branch is merged as part of a single commit, the text output of "git log --graph" appears something like the following:
* | | b9783c0c2
* | | c6c684cd7
| | *-------. f91f7549e Interesting commit
| | |\ \ \ \ \
| | | | | | | * 57759c11a
| | | | | | | * 9f1924f08

The parsing of the graph in public/vendor/plugins/gitgraph/gitgraph.js does not handle the "-" characters properly, resulting in an error that prevents display of commits subsequent to the line with the merge.

At line 391, changing:
color = flows[colomnIndex].color;
to:
if (colomn === "-") {
currentRow.splice(colomnIndex + 1, 1);
color = flows[colomnIndex+1].color;
}
else {
color = flows[colomnIndex].color;
}
Corrects the display, in our repository, but I am unsure of any side effects, particularly with the flows array.

Screenshots

Originally created by @eightfingers89 on GitHub (Jun 18, 2019). - Gitea version (or commit ref): 1.7.6 - Git version: - Operating system: Centos - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X] No - [ ] Not relevant - Log gist: ## Description When more that one branch is merged as part of a single commit, the text output of "git log --graph" appears something like the following: `* | | b9783c0c2 ` `* | | c6c684cd7 ` `| | *-------. f91f7549e Interesting commit` `| | |\ \ \ \ \` `| | | | | | | * 57759c11a ` `| | | | | | | * 9f1924f08 ` The parsing of the graph in public/vendor/plugins/gitgraph/gitgraph.js does not handle the "-" characters properly, resulting in an error that prevents display of commits subsequent to the line with the merge. At line 391, changing: ` color = flows[colomnIndex].color;` to: ` if (colomn === "-") {` ` currentRow.splice(colomnIndex + 1, 1);` ` color = flows[colomnIndex+1].color;` ` }` ` else {` ` color = flows[colomnIndex].color;` ` }` Corrects the display, in our repository, but I am unsure of any side effects, particularly with the flows array. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the topic/uiissue/staletype/bug labels 2025-11-02 05:14:33 -06:00
Author
Owner

@lafriks commented on GitHub (Jun 20, 2019):

it should probably needs to be tested with latest gitgraph.js and if still not working reported upstream

@lafriks commented on GitHub (Jun 20, 2019): it should probably needs to be tested with latest gitgraph.js and if still not working reported upstream
Author
Owner

@eightfingers89 commented on GitHub (Jun 20, 2019):

I originally tested with a copy of gitgraph.js after the the fix for #3382 so I will open one under bluef/gitgraph.js

@eightfingers89 commented on GitHub (Jun 20, 2019): I originally tested with a copy of gitgraph.js after the the fix for #3382 so I will open one under bluef/gitgraph.js
Author
Owner

@stale[bot] commented on GitHub (Aug 19, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Aug 19, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Sep 2, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Sep 2, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3486