lusingander / serie

A rich git commit graph in your terminal, like magic 📚
MIT License
435 stars 13 forks source link

Running `serie` on `git`'s git repo stackoverflows #4

Closed kdheepak closed 3 months ago

kdheepak commented 3 months ago

Clone https://github.com/git/git/ and run serie:

image

It does not segfault with tig or vim-flog. LazyGit loads only 300 commits and loads more if necessary but I think it should be fast enough to load everything, render the entire graph, and display only what the height can display.

lusingander commented 3 months ago

Thanks for the report.

I understand that large repositories have issues, but it wasn't a priority. Due to the nature of the application, complex graphs will not fit on the terminal. On the other hand, repositories with many commits but a simple graph should be better off being properly behaved.

kdheepak commented 3 months ago

After the change in #5 I'm not getting a stackoverflow but I am getting a different error:

image

I think this is because you have min_x as u8. If you make that u32 or u64 you might not get the error. I would be possible to get the same graph to work with left and right scrolling. That'd be pretty awesome if it were to work.

lusingander commented 3 months ago

Thanks, I'm using u8 for the reasons stated above.

Horizontal scrolling is certainly one option. The way I thought of implementing this is to specify an offset and display only a part of the image.

However, the iTerm protocol does not have such a specification, and it just passes a base64 encoded string, so it seems that calculations would be required each time (it may be possible with the kitty protocol).

kdheepak commented 3 months ago

No worries! I have a patch that changes some u8 to usize and it seems to work the same on small repos. On a repo the size of git it just hangs forever. I understand that's not a priority, though. I can close this issue!