[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Moving etc/NEWS around causing release branch merge to fail again
From: |
Eli Zaretskii |
Subject: |
Re: Moving etc/NEWS around causing release branch merge to fail again |
Date: |
Wed, 14 Dec 2022 18:01:22 +0200 |
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Tue, 13 Dec 2022 21:32:41 -0800
> Cc: emacs-devel@gnu.org
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > What happened, exactly? Please tell more about what you saw.
>
> I saw the automatic merge fail with this error message:
>
> etc/NEWS has been modified
I looked at what gitmerge.el does for NEWS, and I admit that I'm
confused. AFAIU, it does this:
. use "git diff" to write the diffs for branch/NEWS to a patchfile
. use "patch" to patch master/NEWS.29 using patchfile
. delete patchfile
. "git add master/NEWS.29"
So far so good, but then it also does this:
. "git reset -- NEWS"
. "git checkout NEWS"
Why does it do that? AFAIU, these two commands _can_ produce changes
in master/NEWS.
> After a merge from the release branch (emacs-NN) to master, the etc/NEWS
> file should never be modified. Only the etc/NEWS.NN file should have
> been modified. Otherwise, it needs to be fixed manually.
>
> See also these lines in admin/automerge:
>
> ## FIXME it would be better to trap this in gitmerge.
> ## NEWS should never be modified, only eg NEWS.26.
> git diff --stat --cached origin/master | grep -q "etc/NEWS " && \
> die "etc/NEWS has been modified"
Right.