Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752596Ab3J0Idw (ORCPT ); Sun, 27 Oct 2013 04:33:52 -0400 Received: from mail-qe0-f53.google.com ([209.85.128.53]:43783 "EHLO mail-qe0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310Ab3J0Idu (ORCPT ); Sun, 27 Oct 2013 04:33:50 -0400 MIME-Version: 1.0 In-Reply-To: <20131027013402.GA7146@leaf> References: <20131024122255.GI9378@mwanda> <20131024122512.GB9534@mwanda> <20131026181709.GB10488@kroah.com> <20131027013402.GA7146@leaf> From: Duy Nguyen Date: Sun, 27 Oct 2013 15:33:19 +0700 Message-ID: Subject: Re: [PATCH] commit: Add -f, --fixes option to add Fixes: line To: Josh Triplett Cc: Git Mailing List , Dan Carpenter , Greg KH , ksummit-2013-discuss@lists.linuxfoundation.org, ksummit-attendees@lists.linuxfoundation.org, Linux Kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1338 Lines: 32 On Sun, Oct 27, 2013 at 8:34 AM, Josh Triplett wrote: > Add a command line option for git commit to automatically construct the > "Fixes:" line for a commit. This avoids the need to manually construct > that line by copy-pasting the commit hash and subject. But you still have to copy/paste the hash in command line. I wonder if we should approach it differently: the user writes "Fixes: " in the commit message, then git detects these lines and expands them using a user-configured format. For the kernel circle, the format would be "%h ('%s')" (I'll need to think how to let the user say "minimum 12 chars"). Other projects need to refer to old commits sometimes in commit messages too and this could be extended further to expand inline abbrev sha-1s, but to not break the text alignment badly, maybe footnotes will be created to store subjects and stuff, rather than do inline expansion. For example, commit 1232343 breaks something..... becomes comit 1232343 [1] breaks something.... [1] 123234332131 (do something wrong - at this date) -- Duy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/