Repository navigation
feat: Use git's --topo-order or --date-order instead of manual calculation - #5
Conversation
--topo-order or --date-order instead of manual calculation
|
Feel free to close this PR and use your patch if you'd like. I made more changes to remove all the warnings and remove the code that is not used. |
|
Great, thanks.
|
|
I'm guessing some commit hashes are different because of timezone differences. I committed all the new images to this branch so we can discuss. I'll rebase and squash before merging if you'd like. |
I removed it in the most recent commit by storing the hashes instead.
Having looked through the test cases here, I don't see one or the other consistently better. And my personal opinion is that sticking to a graph that is similar to what
I think the way you handled stashes is much nicer, but doing that while relying on the output of the |
|
Thank you for responding!
Thank you for sharing. Looking at it again, it seems to be in pretty good, so this should be fine. Regarding the dates in the image, you may be able to solve the problem by converting The hash value appears to change when a merge commit occurs, not for a simple commit 🤔
I see. I think it's better to display the stash as it was originally, so I think we should fix it. |
I fixed this in the most recent commit.
Yeah, I noticed that after. I initially assumed it was because of the dates but I'm still seeing it after changing it to UTC. I'm not sure what is going on there? Honestly I'm surprised that git hashes are reproducible at all, I assumed there was always some randomness added.
I'm not sure how to do that though with the new implementation in this PR. |
Thanks, it certainly seems to have been fixed.
The changes you made only affect the display of the image, so they do not affect the commit date. Since the following values are set when creating a commit, all elements required to calculate SHA1 are fixed. Lines 925 to 930 in 779bd6e However, this is the same for merge, so I'm not sure what is affecting it 🤔
I'll think about it. However I think the most straightforward approach would be to look at the commit list from the top and insert them as appropriate. |
I added a new commit now that changes the |
|
Could you please share the This is what I ran in my local environment: |
|
Here's mine: branch_001.zip |
71ce885 to
e3e174b
Compare
|
I added the original images back to the PR in a new commit, so if you squash merge on GitHub it'll not bloat your git history. |
lusingander
left a comment
There was a problem hiding this comment.
Thank you for dealing with various issues!
The approach seems good, so it might be good to merge it for now and deal with the squash issue as a separate PR.
The hash issue is probably resolved, so it seems fine to commit images with updates, including squash (I want to fix it so that the test passes).
With that in mind, I've added a few minor comments.
|
I made all your requested changes! |
lusingander
left a comment
There was a problem hiding this comment.
I really appreciate your assistance with looking into the issues. Thank you so much!



This seems to resolve #2 for me. With this change, I don't get any unstable layouts anymore (i.e. the order matches the output of git log) and I'm not able to trigger a segfault anymore.
Also resolves #3