From patchwork Fri Jul 25 22:40:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Bronson X-Patchwork-Id: 2182 Received: (qmail 17035 invoked by alias); 25 Jul 2014 22:40:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 17004 invoked by uid 89); 25 Jul 2014 22:40:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-qa0-f41.google.com Received: from mail-qa0-f41.google.com (HELO mail-qa0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 25 Jul 2014 22:40:35 +0000 Received: by mail-qa0-f41.google.com with SMTP id j7so5200593qaq.0 for ; Fri, 25 Jul 2014 15:40:33 -0700 (PDT) X-Received: by 10.224.16.212 with SMTP id p20mr14961280qaa.1.1406328032690; Fri, 25 Jul 2014 15:40:32 -0700 (PDT) Received: from hydrogen (naesten-pt.tunnel.tserv4.nyc4.ipv6.he.net. [2001:470:1f06:57::2]) by mx.google.com with ESMTPSA id 98sm12747952qgh.5.2014.07.25.15.40.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 25 Jul 2014 15:40:31 -0700 (PDT) Received: from naesten by hydrogen with local (Exim 4.82) (envelope-from ) id 1XAoA8-0002l3-IK; Fri, 25 Jul 2014 18:40:28 -0400 From: Samuel Bronson To: Pedro Alves Cc: binutils@sourceware.org, gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org Subject: [COMMIT] Add a .gitattributes file for use with git-merge-changelog References: <87sin0gvr3.fsf@naesten.mooo.com> <87ha3fad30.fsf@fleche.redhat.com> <87k38bgp7w.fsf@naesten.mooo.com> <8738eowqkc.fsf@naesten.mooo.com> <87oax0k4xt.fsf@naesten.mooo.com> <53BBB0D7.9010908@redhat.com> Date: Fri, 25 Jul 2014 18:40:28 -0400 In-Reply-To: <53BBB0D7.9010908@redhat.com> (Pedro Alves's message of "Tue, 08 Jul 2014 09:50:31 +0100") Message-ID: <87r4195ag3.fsf_-_@naesten.mooo.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Individual users will still have to: 1. Install git-merge-changelog 2. Set up the merge driver in their git config See gnulib's lib/git-merge-changelog.c [1] for details. For example, I: 1. Patched Debian's gnulib package to build git-merge-changelog, and sent the patch to the Debian maintainer, who then proceeded to not only accept my patch but even write a *manpage* for git-merge-changelog! (Let's hear it for Ian Beckwith.) So now, I can install it simply by running "apt-get install git-merge-changelog". (Except, of course, that I already have it installed from when I was testing my patch.) 2. Did step (2) from .gitattributes With this patch applied and the above two steps done by whatever means you deem best, you can say goodbye to merge conflicts in ChangeLog files -- at least *IF* people stop renaming the danged things, anyway. If you don't do step 2, you will continue to suffer from ChangeLog merge conflicts exactly as before, whether or not you did step 1. If you do step 2 but not step 1, git will likely start complaining that it can't find any "git-merge-changelog" to run. [1]: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/git-merge-changelog.c [Note: The docs for git-merge-changelog (the comments at the top) say that you need a .gitattributes in every directory. The docs are wrong. Ignore the docs. Well, not the whole docs; just that part. You really only need one at the top level, since .gitattributes uses the same pattern matching rules as .gitignore, which match files in any subdirectory unless you prefix the pattern with a "/", as explained in the gitignore(5) manpage.] --- .gitattributes | 20 ++++++++++++++++++++ ChangeLog | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..06d51d2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,20 @@ +# -*- conf -*- + +## Set merge driver for ChangeLog files +# See gnulib's lib/git-merge-changelog.c (or git-merge-changelog(1)) +# for per-user setup instructions. +# +# The short version of this (optional) procedure is: +# +# (1) Install git-merge-changelog (this is the tricky part!) +# +# (2) Add something like the following to your ~/.gitconfig: +# +# [merge "merge-changelog"] +# name = GNU-style ChangeLog merge driver +# driver = git-merge-changelog %O %A %B +# +# (3) Enjoy mostly effortless ChangeLog merges, at least until the +# file gets renamed again ... + +ChangeLog merge=merge-changelog diff --git a/ChangeLog b/ChangeLog index 16047d3..5c8fe15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-07-25 Samuel Bronson + + * .gitattributes: New file for use with git-merge-changelog. + 2014-07-21 Joel Sherrill Disable gdb for or1k*-*-* until supported