Closed lschade closed 2 years ago
Nice, thank you for noticing!
This improves performance by about 90% according to profile/reports/is_ahead_is_ancestor
for searching through 1000 commits.
Elapsed time for 'is_ahead_of' 15.791177749633789 ms Elapsed time for 'is_ancestors_of' 174.46517944335938 ms
The check if my local branch is ahead of remote was really slow for me with a branch that is ~100 commits ahead of the remote branch (I merged some other branch into the branch). It was stuck in depth_search_commit.
Found a faster way to check if local is ahead of remote. https://stackoverflow.com/questions/17224134/check-status-of-local-python-relative-to-remote-with-gitpython No sure though if it does exactly the same as is_ancestors_of