Samuel Bronson <naes...@gmail.com> writes: > Package: git-merge-changelog > Version: 20140202+stable-2 > Severity: normal > > Dear Maintainer, > > Your git-merge-changelog(1) manpage and the source file > git-merge-changelog.c both say that you need a '.gitattributes' file in > *every* directory. In fact, if you want all files named ChangeLog in a > given git repository to be merged using git-merge-changelog, you just > need one .gitattributes file at the top of the tree, with the same > contents already documented in both manpage and source. > > This is because the pattern is treated the same as in .gitignore, which > means that for a pattern to be restricted to matching a file relative > to that particular directory, it must start with a /, so "ChangeLog" > will match any file named ChangeLog in the directory containing the > .gitattribute file or any of its subdirectories.
Hi Samuel. Thanks for the bug report. I believe you are right, and I suggest the patch below. Bruno, what do you think? Maybe today it is more fashionable to use top-level .gitattributes and not bother with per-directory files that feels like a CVS idiom. /Simon diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c index 3cffe1fd2f..b8c6b63c32 100644 --- a/lib/git-merge-changelog.c +++ b/lib/git-merge-changelog.c @@ -55,8 +55,9 @@ 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: + - In every directory that contains a ChangeLog file, or + at the top-level directory, add a file '.gitattributes' with + this line: ChangeLog merge=merge-changelog
signature.asc
Description: PGP signature