From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17971 invoked by alias); 15 Aug 2014 16:08:37 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 17950 invoked by uid 89); 15 Aug 2014 16:08:34 -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, 15 Aug 2014 16:08:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 036AF116511; Fri, 15 Aug 2014 12:08:31 -0400 (EDT) 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 g82B59cOy0x0; Fri, 15 Aug 2014 12:08:30 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BA22F1162F4; Fri, 15 Aug 2014 12:08:30 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A1EBF410D3; Fri, 15 Aug 2014 09:08:29 -0700 (PDT) Date: Fri, 15 Aug 2014 16:08:00 -0000 From: Joel Brobecker To: Gary Benson Cc: Mike Frysinger , gdb@sourceware.org, Andreas Arnez Subject: Re: ChangeLogs in commit messages Message-ID: <20140815160829.GF6019@adacore.com> References: <20140814083231.GA6283@blade.nx> <6036430.RnprRWgZmF@vapier> <20140814131206.GA12746@blade.nx> <20140814132939.GH4924@adacore.com> <20140815084819.GB30130@blade.nx> <20140815121102.GB6019@adacore.com> <20140815130913.GA1954@blade.nx> <20140815132816.GC6019@adacore.com> <20140815150202.GA5674@blade.nx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140815150202.GA5674@blade.nx> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-08/txt/msg00056.txt.bz2 > I've put together a quick pre-receive hook (inlined below). Each > received commit on the "master" branch that touches the "gdb" > subdirectory gets its message checked. The check itself is fairly > cursory: it splits the message using the "YYYY-MM-DD NAME " > headers, checks each is preceeded by a path starting with "gdb/" and > ending with "/", and checks each is followed by more "NAME " > lines, blank lines, or lines starting with tab. I don't know how > comprehensive we want to be here as the message should already have > been checked over by the reviewer. > > I've never done anything server-side with git before, so there may > well be things I'm missing here. I was mainly experimenting to see > how difficult this all was :) Just looking quickly at the script for the typical mistakes I made when I first started dabbling into this kind of script: . The SHA1 is 000[...]0 when creating a new reference (Eg: creating a new branch). But that's an invalid SHA1 . Same when deleting a reference. the "new rev" is 0. . I would suggest we do that on all branches except branches under a specific namespace (thinking "vendor" branches, TBD). . When creating a new branch, you really don't want to start checking the entire history again, so you need to find the branchpoint and use that as the "old rev". I would like to push again for the format without the date and author email but the simpler gdb/ChangeLog: instead. The commit already stores that information (author name and email, committer date), whereas requiring the user to provide it in the rev log means that the date needs to be maintained throughout the lifetime of the patch until that patch gets pushed. Same thing when cherry-picking a patch from master to a release branch. -- Joel