opencommit icon indicating copy to clipboard operation
opencommit copied to clipboard

[Bug]: rebasing is painfully slow with opencommit hook set

Open muni-corn opened this issue 4 months ago • 0 comments

Opencommit Version

3.2.7

Node Version

v22.16.0

NPM Version

10.9.2

What OS are you seeing the problem on?

Other Linux Distro

What happened?

when rebasing my repositories with the prepare-commit-msg hook, i get the following behavior, where each commit applied takes about one second because of opencommit:

Image

as a result, rebases can take a painstaking amount of time, whereas without the hook, they take only a second.

Expected Behavior

i would like opencommit to exit from its script as early as possible during rebases.

Current Behavior

opencommit doesn't exit early during rebases; it seems to be checking for updates for each pick command in a rebase, which greatly slows down the rebase operation.

Possible Solution

check for rebasing as early as possible in the git hook script, and exit immediately if so.

Steps to Reproduce

  1. git switch -c to a new branch that you can safely mess up with a rebase
  2. oco hook set
  3. git rebase -i HEAD~30
  4. rearrange or drop an early commit
  5. observe that oco drastically slows down rebase time

Relevant log output


muni-corn avatar Jul 06 '25 22:07 muni-corn