public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Specify a custom git merge driver for ChangeLog files
@ 2018-03-19 18:33 Dmitry V. Levin
  2018-03-20 23:03 ` Mark Wielaard
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry V. Levin @ 2018-03-19 18:33 UTC (permalink / raw)
  To: elfutils-devel

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 .gitattributes | 1 +
 ChangeLog      | 4 ++++
 2 files changed, 5 insertions(+)
 create mode 100644 .gitattributes

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..ca4ea27
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+ChangeLog	merge=merge-changelog
diff --git a/ChangeLog b/ChangeLog
index 279c3b2..91258e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-03-19  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* .gitattributes: New file.
+
 2018-02-09  Joshua Watt  <JPEWhacker@gmail.com>
 
 	* configure.ac (HAVE_FALLTHROUGH): New define.
-- 
ldv

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Specify a custom git merge driver for ChangeLog files
  2018-03-19 18:33 [PATCH] Specify a custom git merge driver for ChangeLog files Dmitry V. Levin
@ 2018-03-20 23:03 ` Mark Wielaard
  2018-03-20 23:20   ` Dmitry V. Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Wielaard @ 2018-03-20 23:03 UTC (permalink / raw)
  To: elfutils-devel

I am not against this, but it could use a bit more documentation
in at least the commit message, so people know what they should
setup in their gitconfig.

Also isn't it better to have something like the following
in your local ~/.gitconfig:

[core]
        attributesfile = ~/.gitattributes

And then have the ChangeLog merge=merge-changelog line
in ~/.gitattributes?

Cheers,

Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Specify a custom git merge driver for ChangeLog files
  2018-03-20 23:03 ` Mark Wielaard
@ 2018-03-20 23:20   ` Dmitry V. Levin
  2018-03-20 23:42     ` Dmitry V. Levin
  2018-03-21  0:16     ` Mark Wielaard
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry V. Levin @ 2018-03-20 23:20 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

On Wed, Mar 21, 2018 at 12:03:53AM +0100, Mark Wielaard wrote:
> I am not against this, but it could use a bit more documentation
> in at least the commit message, so people know what they should
> setup in their gitconfig.

The advantage of adding .gitattributes file to repository is that
no gitconfig setup is needed at all, just git-merge-changelog
has to be made available in $PATH.


-- 
ldv

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Specify a custom git merge driver for ChangeLog files
  2018-03-20 23:20   ` Dmitry V. Levin
@ 2018-03-20 23:42     ` Dmitry V. Levin
  2018-03-21  0:16     ` Mark Wielaard
  1 sibling, 0 replies; 5+ messages in thread
From: Dmitry V. Levin @ 2018-03-20 23:42 UTC (permalink / raw)
  To: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

On Wed, Mar 21, 2018 at 02:20:51AM +0300, Dmitry V. Levin wrote:
> On Wed, Mar 21, 2018 at 12:03:53AM +0100, Mark Wielaard wrote:
> > I am not against this, but it could use a bit more documentation
> > in at least the commit message, so people know what they should
> > setup in their gitconfig.
> 
> The advantage of adding .gitattributes file to repository is that
> no gitconfig setup is needed at all, just git-merge-changelog
> has to be made available in $PATH.

My bad, gitconfig setup cannot be avoided this way.
Being an early adopter of git-merge-changelog,
I must have forgotten these details.


-- 
ldv

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Specify a custom git merge driver for ChangeLog files
  2018-03-20 23:20   ` Dmitry V. Levin
  2018-03-20 23:42     ` Dmitry V. Levin
@ 2018-03-21  0:16     ` Mark Wielaard
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Wielaard @ 2018-03-21  0:16 UTC (permalink / raw)
  To: elfutils-devel

On Wed, Mar 21, 2018 at 02:20:51AM +0300, Dmitry V. Levin wrote:
> On Wed, Mar 21, 2018 at 12:03:53AM +0100, Mark Wielaard wrote:
> > I am not against this, but it could use a bit more documentation
> > in at least the commit message, so people know what they should
> > setup in their gitconfig.
> 
> The advantage of adding .gitattributes file to repository is that
> no gitconfig setup is needed at all, just git-merge-changelog
> has to be made available in $PATH.

O, interesting. That doesn't seem to be documented anywhere.
So, when git sees merge-changelog as custom merge command and
there is no custom merge definition, then it will try to execute
git merge-changelog, which will invoke git-merge-changelog from
the PATH?

Could you add this explanation to the commit message?
And a brief comment about git-merge-changelog coming from gnulib?

Thanks,

Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-21  0:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 18:33 [PATCH] Specify a custom git merge driver for ChangeLog files Dmitry V. Levin
2018-03-20 23:03 ` Mark Wielaard
2018-03-20 23:20   ` Dmitry V. Levin
2018-03-20 23:42     ` Dmitry V. Levin
2018-03-21  0:16     ` Mark Wielaard

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