← Winnitude! Search  ·  Reader Mode (1989 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 9 LINKS

Improve pre-push file list when merges are involved · Issue #860 · pre-commit/pre-commit

Repository navigation

Improve pre-push file list when merges are involved  #860


New issue

New issue

Open

Open
Improve pre-push file list when merges are involved #860 Labels
feature

Description

@prem-nuro's profile prem-nuro opened on Nov 6, 2018

If I have a feature branch based on some old commit in develop or master, and I merge in develop or master, the pre-push hooks will run over all the merge commit files. Would it be possible to add a setting to provide a known "good" branch whose changes can be ignored? This is potentially useful as you gradually roll out a new check on a codebase, or if only some people have hooks installed.

A current workaround for this is by manually doing something like git diff $(git merge-base HEAD develop) --name-only [--diff-filter=ACMR?] in custom hooks, but I'd like to do this for other hooks I haven't written. The effect of this setting would just be to shrink the list of files provided to the hook, so their code wouldn't change.

Example repo: https://github.com/prem-nuro/precommit-issue-860

Reacted by Ian Chamberlain, Jamison Lahman, Paweł Żukowski, Yilei and Maxime Brunet

Metadata

Metadata

Assignees

No one assigned

    Labels


    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions