From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109344 invoked by alias); 24 Jan 2020 22:38:50 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 109328 invoked by uid 89); 24 Jan 2020 22:38:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=game, HX-Languages-Length:2414 X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.146.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Jan 2020 22:38:46 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 9814EF95D6C for ; Fri, 24 Jan 2020 16:27:14 -0600 (CST) Received: from box5922.bluehost.com ([162.241.30.80]) by cmsmtp with SMTP id v7Q2ipvseERZgv7Q2ihUQP; Fri, 24 Jan 2020 16:27:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mad-scientist.us; s=default; h=Content-Transfer-Encoding:Mime-Version: Content-Type:References:In-Reply-To:Date:To:Reply-To:From:Subject:Message-ID: Sender:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bb7cDskfZ+M3gdX0biaj7TINY8NmeEbSN+Wetd3iC6M=; b=3AbyU1Y732ePj0uPw5ZNuYc5zK fgUDBA2uxwakLTh6En5m/L/A4rIMyF/HYVdtDrwk3NMqrS2ONYYE9ZUGhccUYpPnXpnqV7OBi+R5E GV7fyzNza2ZMtLzNIps1ZdLgo; Received: from [65.112.16.22] (port=48596 helo=pdslaptop) by box5922.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iv7Q2-000fXi-86 for gcc@gcc.gnu.org; Fri, 24 Jan 2020 15:27:14 -0700 Message-ID: Subject: Re: Git ChangeLog policy for GCC Testsuite inquiry From: Paul Smith Reply-To: paul@mad-scientist.net To: gcc@gcc.gnu.org Date: Sat, 25 Jan 2020 10:53:00 -0000 In-Reply-To: <20200124214533.GB17695@tucnak> References: <0829cb62791e9d8d034309f09b6c911ed8340c8b.camel@redhat.com> <1693150.uSzEE5ffML@polaris> <20200124214533.GB17695@tucnak> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00454.txt.bz2 On Fri, 2020-01-24 at 22:45 +0100, Jakub Jelinek wrote: > > > In my experience the output of git log is a total mess so cannot > > > replace ChangeLogs. But we can well decide to drop ChangeLog for > > > the testsuite. > > > > Well, glibc has moved to extracting them from git, building > > policies and scripts around that. I'm pretty sure other > > significant projecs are also extracting their ChangeLogs from git. > > > > We could do the same, selecting some magic date as the cutover > > point after which future ChangeLogs are extracted from GIT. In > > fact, that's precisely what I'd like to see us do. > > We don't have a tool that can do it, not even get the boilerplate > right. Yes, mklog helps, but it very often gets stuff wrong. Not to > mention that the text what actually changed can't be generated very > easily. I don't know if it counts as a significant project, but GNU make has been doing this for years. What I did was take the existing ChangeLogs and rename them to ChangeLog.1 or whatever, then started with a new ChangeLog generated from scratch from Git messages. I use the gnulib build-aux/gitlog-to-changelog script to do it. It requires a little bit of discipline to get right; in particular you have to remember that the Git commit message will be indented 8 spaces in the ChangeLog, so you have to be careful that your commit messages wrap at char 70 (or less) in your Git commit. If you have Git hooks you could enforce a bit of formatting; for example any line not indented by space must be <=70 chars long; this allows people to use long lines for formatted content if they indent it with a space or two. Otherwise, it's the same as writing the ChangeLog and you only have to do it once. Just to note, the above script simply transcribes the commit message into ChangeLog format. It does NOT try to auto-generate ChangeLog- style content (files that changed, functions, etc.) from the Git diff or whatever. There are a few special tokens you can add to your Git commit message that get reformated to special changelog tokens like "(tiny change)" etc. As mentioned previously, it's very important that the commit message be provided as part of the code review, and it is very much fair game for review comments. This is common practice, and a good idea because bad commit messages are always a bummer, ChangeLog or not.