unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Moving etc/NEWS around causing release branch merge to fail again
Date: Wed, 14 Dec 2022 18:01:22 +0200	[thread overview]
Message-ID: <83k02um0tp.fsf@gnu.org> (raw)
In-Reply-To: <CADwFkm=LjVOWrsnWCOerWe9X3+cKOaHJWLE0+r4iMAhyeWF6OQ@mail.gmail.com> (message from Stefan Kangas on Tue, 13 Dec 2022 21:32:41 -0800)

> 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.



  reply	other threads:[~2022-12-14 16:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 15:49 Moving etc/NEWS around causing release branch merge to fail again Stefan Kangas
2022-12-08 18:08 ` Eli Zaretskii
2022-12-08 22:20   ` Stefan Kangas
2022-12-13 23:34     ` Stefan Kangas
2022-12-14  3:42       ` Eli Zaretskii
2022-12-14  5:32         ` Stefan Kangas
2022-12-14 16:01           ` Eli Zaretskii [this message]
2022-12-31 22:42       ` Yuan Fu
2023-01-01  6:30         ` Eli Zaretskii
2023-01-01 23:23           ` Yuan Fu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83k02um0tp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).