Skip to content

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

@muni-corn

Description

@muni-corn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions