-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git commit will hang if lots of files are in staging, like when merging master #26
Comments
How many files is too many files? How large is the change overall? |
there were like about 12 files or so. |
the change was about 1000 lines of unstaged changes |
That should still work fine, I've done commits of similar sizes before with no problems. How large are the files overall? |
ok let me get you that complete info |
CHARACTERS 88114 |
i don;t want to put the git diff file as it is internal repo. but i could replace the characters in the file with some token and post it |
Is that the size of the diff, or the files themselves? Number of lines would be useful too. |
the size of the diff. 1712 lines |
Hmm, even that should be fine. What git-confirm actually does is:
The interesting question is which part of that is slow for you, and why. If we know that, we can work out how to detect this case quickly and reliably, and then do something about it (or stop it being slow in the first place). If I take the diff you've uploaded there, and There's also generally some duplication here, I don't think there's any good reason not to do the diff once per file and then grep repeatedly, rather than repeating everything for every pattern. Do you have a very long list of custom patterns configured? |
ah no. #!/bin/sh . git-sh-setup # for die |
so i can run git confirm sh seperately then i guess to see where the bottleneck is |
could u give me an sh file which outputs the start time and end time after each operation , so then i can see where it is taking time ? |
The real code is here: https://github.com/pimterry/git-confirm/blob/master/hook.sh#L50-L55 You can add If you've got your repo in the right state (all your changes added, ready to commit) you should also be able to just run the commands above with the appropriate |
for now I am using git commit --no-verify . but maybe git confirm can have some kind of logic to skip the check if there are too many files in staging,
The text was updated successfully, but these errors were encountered: