From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7944 invoked by alias); 16 Jan 2015 16:18:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7933 invoked by uid 89); 16 Jan 2015 16:18:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 16 Jan 2015 16:18:47 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DAD511166C2; Fri, 16 Jan 2015 11:18:45 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KQ8x4c8RLFeV; Fri, 16 Jan 2015 11:18:45 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7EE5E11653C; Fri, 16 Jan 2015 11:18:45 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 4791248E8B; Fri, 16 Jan 2015 20:18:41 +0400 (RET) Date: Fri, 16 Jan 2015 16:18:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: Commit hook annoyance Message-ID: <20150116161841.GS8167@adacore.com> References: <83ppae1zsq.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83ppae1zsq.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-01/txt/msg00462.txt.bz2 > Is this really necessary? > > $ git push > Counting objects: 94, done. > Compressing objects: 100% (4/4), done. > Writing objects: 100% (4/4), 742 bytes | 0 bytes/s, done. > Total 4 (delta 3), reused 0 (delta 0) > remote: *** Pattern "Conflicts:" has been detected. > remote: *** (in commit 7fa8e2a29c9357024d21bdf09faa5cb930a4ffe5) > remote: *** > remote: *** This usually indicates a merge commit where some merge conflicts > remote: *** had to be resolved, but where the "Conflicts:" section has not > remote: *** been deleted from the revision history. > remote: *** > remote: *** Please edit the commit's revision history to either delete > remote: *** the section, or to avoid using the pattern above by itself. > remote: error: hook declined to update refs/heads/gdb-7.9-branch > To git+ssh://sourceware.org/git/binutils-gdb.git > ! [remote rejected] gdb-7.9-branch -> gdb-7.9-branch (hook declined) > error: failed to push some refs to 'git+ssh://sourceware.org/git/binutils-gdb.git' > > There was no unresolved conflicts in the commit I tried to push. Why > does the hook insist on forcing me to remove the "Conflicts:" part, > instead of looking for the merge-commit conflict markers? Why do we > care about leaving the reference to original conflicts in the log? There is a commit whose revision log has a line that has "Conflict:" in its revision log. This usually happens when you cherry-pick a commit, resolve merge conflicts, and then commit again. Git decides to append a section at the end off the new revision log which lists the files where there were some conflicts. In our experience at AdaCore, these are useless, and people often don't even notice them. Hence the check. -- Joel