Hi Samuel and Simon, > I believe you are right, and I > suggest the patch below. Bruno, what do you think?
Yes, you are right. I have a package with a .gitattributes at the top-level and a src/ChangeLog, and the .gitattributes file has the desired effect. (Things may well have been different 16 years ago. But what matters are the 'git' versions in use today.) > Maybe today it is > more fashionable to use top-level .gitattributes and not bother with > per-directory files that feels like a CVS idiom. Absolutely. I'm committing this: 2024-07-02 Bruno Haible <br...@clisp.org> git-merge-changelog: Simplify installation instructions. Reported by Samuel Bronson <naes...@gmail.com> via Simon Josefsson in <https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00014.html>. * lib/git-merge-changelog.c: Suggest creating a .gitattributes file only at the top-level. diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c index 3cffe1fd2f..60754c8367 100644 --- a/lib/git-merge-changelog.c +++ b/lib/git-merge-changelog.c @@ -1,5 +1,5 @@ /* git-merge-changelog - git "merge" driver for GNU style ChangeLog files. - Copyright (C) 2008-2021 Bruno Haible <br...@clisp.org> + Copyright (C) 2008-2024 Bruno Haible <br...@clisp.org> This file is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -55,8 +55,8 @@ name = GNU-style ChangeLog merge driver driver = /usr/local/bin/git-merge-changelog %O %A %B - - In every directory that contains a ChangeLog file, add a file - '.gitattributes' with this line: + - Add to the top-level directory of the checkout a file '.gitattributes' + with this line: ChangeLog merge=merge-changelog @@ -77,12 +77,12 @@ Additionally, for hg users: - Add to your $HOME/.hgrc the lines - [merge-patterns] - ChangeLog = git-merge-changelog + [merge-patterns] + ChangeLog = git-merge-changelog - [merge-tools] - git-merge-changelog.executable = /usr/local/bin/git-merge-changelog - git-merge-changelog.args = $base $local $other + [merge-tools] + git-merge-changelog.executable = /usr/local/bin/git-merge-changelog + git-merge-changelog.args = $base $local $other See <https://www.selenic.com/mercurial/hgrc.5.html> section merge-tools for reference.