[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#29197: 27.0.50; pre-commit checks for new files against "head"
From: |
Noam Postavsky |
Subject: |
bug#29197: 27.0.50; pre-commit checks for new files against "head" |
Date: |
Tue, 7 Nov 2017 16:36:37 -0500 |
On Tue, Nov 7, 2017 at 2:18 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> I finally figured out why recently, every time I merge changes from
> master into my local branch it complains:
>
> File name does not consist of -+./_ or ASCII letters or digits.
>
> It turns out it's because it's looking at the diff between master and my
> local (merged) branch (i.e. it looks at my local changes) whereas before
> it would look at the diff between the old version of my local branch and
> the merged version of my local branch (i.e. at the changes I'm pulling
> from master).
See [1] and followups. Getting warnings about other people's changes
was causing some confusion and frustration.
[1]: https://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00299.html
> And yes, indeed, my local branch has some files with "weird" chars
> in it.
>
> I think the warning should be improved:
> - I shouldn't get a warning in the above case, since this commit doesn't
> *add* those files (they weren't on origin/master admittedly but they were
> already on HEAD).
We could choose which side of the merge to check based on an
environment var (that was considered in the thread I referenced above,
but we didn't see much of a use case at the time). Or is it possible
to check only changes from the merge itself (i.e., in case of conflict
resolution)?
> - the warning should give me some hint about which file fails the test.
Yeah, that would make sense.