Open Reecstuff opened 2 years ago
@Reecstuff Can I work on this?
I'm facing the same issue on MacBook Pro (15-inch, 2019).
Not only the cases written above. Github is unable to merge code properly, even I GitHub desktop application is crashing and throwing the exception(attached screenshot).
The problem
You have long waiting Time upon clicking on History?
You get stuck waiting for History to open?
Your Github Desktop crashes after a few seconds and you see the error
RangeError: Invalid String Length
as posted in the screenshot down below?So congratulation you have a commit message in your History that is too long for the UI to load 🎉
This happens because you used Squash and merge too often in your repo. Squash and merge generates a commit message description that includes all of your commits and all commits of other Squash and merge commits. After using this for a while your message gets so long it increases the loading time of your history and in the end crashes GitHub Desktop. You can also reproduce this behavior with every other Git Client, like Git Fork if you click on the bugged commit. Because GitHub Desktop loads your history in the background after startup it crashes after a few seconds upon finding the string the UI can't handle.
How to solve this (until it is fixed)?
That's easy "just" make a new repo and delete the old one. The complete history ist bugged because of this and you can only open the history via
git log
in a command line tool like Git Bash.Save your local files and remove all git related files / folders from your project. Delete your old Repo on the server. Create a new Repository and clone it, drag your old files into your new repository, commit, push and done.
How to prevent this from happening?
Currently you should not use Squash and merge and just use normal merge. Or you could amend your commit after Squash and merge before pushing and delete the description.
What would I except of Squash and merge?
Squash and merge should not generate a description which includes all commits. I just need a Title like "Squash and merge
otherbranch
intocurrentbranch
" instead of the currently misleading message "Squashed commit of the following:". Most of the time you only see the title and the description is one click too far away.Release version
3.0.8
Operating system
Windows 11
Steps to reproduce the behavior
main
(I name them herebranch1
andbranch2
main
intobranch1
branch1
(the more the better)branch1
intomain
main
intobranch2
branch2
main
intobranch2
branch2
intomain
With this setup you should only have "Squashed commit of the following:" commits in your history, so the commit messages stack up nicely and the description string of your commits gets longer and longer. After some time you will notice that your history loads slower and gets stuck after more commits. If you go even further Github Desktop will show you the expected Error
RangeError: Invalid string length
.An important thing to note: All your other Repos are still working in Github Desktop, just switch to them and the history opens as expected.
Log files
No response
Screenshots
Additional context
As @steveward mentioned in #13006 I should put this into a new Issue and here it is.