git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Benoit SIGOURE <tsuna@lrde.epita.fr>
Cc: bug-gnulib@gnu.org, git list <git@vger.kernel.org>
Subject: Re: GNU-style ChangeLog merge driver for Git
Date: Tue, 9 Oct 2007 21:38:46 +0200	[thread overview]
Message-ID: <200710092138.47147.bruno@clisp.org> (raw)
In-Reply-To: <BC06CC09-FD81-4153-AA54-A1A74250946B@lrde.epita.fr>

Hello Benoit,

> Akim Demaille would also like it to squash the commits added by the  
> merge (the new commits in OTHERS):
> 
> YYYY-MM-DD  Author  <who@where.com>
> 
> 	Merge whatever:
> 
> 	YYYY-MM-DD  Someone Else  <foo@bar.com>
> 	Some change.
> 	* FileChanged.c: Whatever.
> 
> 	YYYY-MM-DD  Who Cares  <who@cares.com>
> 	Some other change.
> 	* OtherFile.c: Do it.
> 
> I thought this was mandated by the GNU Coding Standards but I  
> checked, it doesn't say anything about merges.  Would this sort of  
> strategy be useful to you?  Should it be default (or enabled by some  
> --squash option)?

This merge is occurring in a different situation:

The situation where we need ChangeLog merging most often is when a developer
has made changes on his own and pulls in the changes from the remote repository
(via "git stash; git pull; git stash apply").

The situation that Akim is describing is that he pulls changes from the
repository of Someone Else and Who Cares, and then pushes them into the
central repository, under his responsibility.

For the first situation, the non-remote ChangeLog entries should be moved
to the top, without modification or indentation.

For the second situation, three different styles are in use at GNU
(because they don't use "Signed-off" lines):

1) unmodified copying of the ChangeLog entries:

YYYY-MM-DD  Someone Else  <foo@bar.com>
	Some change.
	* FileChanged.c: Whatever.

YYYY-MM-DD  Who Cares  <who@cares.com>
	Some other change.
	* OtherFile.c: Do it.

2) copying with lieutenant's email address, like Akim described it:

YYYY-MM-DD  Lieu Tenant  <who@where.com>

	YYYY-MM-DD  Someone Else  <foo@bar.com>
	Some change.
	* FileChanged.c: Whatever.

	YYYY-MM-DD  Who Cares  <who@cares.com>
	Some other change.
	* OtherFile.c: Do it.

3) similar, but with indentation of the entire copied-in ChangeLog entries:

YYYY-MM-DD  Lieu Tenant  <who@where.com>

	YYYY-MM-DD  Someone Else  <foo@bar.com>
		Some change.
		* FileChanged.c: Whatever.

	YYYY-MM-DD  Who Cares  <who@cares.com>
		Some other change.
		* OtherFile.c: Do it.

First of all, your merge driver could try to guess whether we're in the
first or second situation (maybe by testing whether the names in the
ChangeLog entry match the [user]name from the git config).

Then, for the second situation, there can be some flag in the driver or in
the git config that describes which of the 3 styles to apply.

Bruno

      reply	other threads:[~2007-10-09 19:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200709301421.52192.bruno@clisp.org>
     [not found] ` <200710020347.43733.bruno@clisp.org>
     [not found]   ` <4AD64749-F4A3-4A61-B1EE-D12523293661@lrde.epita.fr>
     [not found]     ` <200710021350.54625.bruno@clisp.org>
2007-10-02 12:16       ` git: avoiding merges, rebasing Eric Blake
2007-10-03 21:31         ` making "git stash" safer to use Bruno Haible
2007-10-03 21:36           ` Junio C Hamano
2007-10-04  8:40           ` Joachim B Haga
2007-10-04 20:59             ` David Kastrup
2007-10-19 13:37         ` stash clear, was Re: git: avoiding merges, rebasing Johannes Schindelin
2007-10-23  8:55           ` Miles Bader
     [not found]       ` <6C9F1445-8826-4E6F-A10C-290A57A4C826@lrde.epita.fr>
2007-10-03 23:01         ` Bruno Haible
     [not found] ` <46FF99E2.8050605@byu.net>
     [not found]   ` <200709302141.25597.bruno@clisp.org>
     [not found]     ` <C64152A3-A5A6-4320-864C-E78E3A60C8E6@lrde.epita.fr>
2007-10-08 13:16       ` Benoit SIGOURE
2007-10-08 13:17       ` Benoit SIGOURE
2007-10-09 10:43         ` Johannes Schindelin
2007-10-09 18:06           ` Benoit SIGOURE
2007-10-09 12:03         ` Bruno Haible
2007-10-09 18:19           ` GNU-style ChangeLog merge driver for Git (was: Re: git: avoiding merges, rebasing) Benoit SIGOURE
2007-10-09 19:38             ` Bruno Haible [this message]

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

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

  git send-email \
    --in-reply-to=200710092138.47147.bruno@clisp.org \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=tsuna@lrde.epita.fr \
    /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.
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 NNTP newsgroup(s).