Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sds/overcommit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.65.0
Choose a base ref
...
head repository: sds/overcommit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.66.0
Choose a head ref
  • 2 commits
  • 10 files changed
  • 2 contributors

Commits on Jan 30, 2025

  1. Add -diff cli option for running precommit hooks against diffs (#860)

    For example, running `overcommit --diff main` from a feature branch will
    run pre-commit hooks against the diff between the two branches.
    
    I was able to very easily leverage existing code for the bulk of the
    feature - this is mainly just adding the cli option, a hook context to
    do the execution and some tests based on the existing `--run-all` test.
    
    ---
    
    For background, my team is responsible for a couple of really old,
    really large rails apps. Getting them completely in compliance with our
    various linters is a huge task that isn't getting done anytime soon
    (things are funky to the point that we've even observed breakages with
    "safe" auto-correct functions).
    
    I introduced/started heavily encouraging overcommit so that we at least
    don't add _new_ linting offenses and things will naturally improve over
    time. It's been great, but offenses still slip through though here and
    there, especially with juniors who might be getting away with not having
    a local install (and/or abusing `OVERCOMMIT_DISABLE=1`).
    
    An option like this would allow me to leverage the very useful "only
    apply to changed lines" logic within a ci environment and help enforce
    my desired "no new linting offenses" policy.
    benmelz authored Jan 30, 2025
    Configuration menu
    Copy the full SHA
    b4d4ce0 View commit details
    Browse the repository at this point in the history
  2. Cut version 0.66.0 (#861)

    sds authored Jan 30, 2025
    Configuration menu
    Copy the full SHA
    43e17fb View commit details
    Browse the repository at this point in the history
Loading