From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Abrahams Subject: Re: cherry-pick / pre-commit hook? Date: Tue, 28 Dec 2010 16:00:48 -0900 Organization: BoostPro Computing Message-ID: References: <20101208175324.GB5687@burratino> <20101208220514.GA8865@burratino> <20101227093729.GB1201@burratino> <7vy679wynd.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Junio C Hamano , Jonathan Nieder , git@vger.kernel.org To: Jakub Narebski X-From: git-owner@vger.kernel.org Wed Dec 29 02:01:08 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PXkPZ-000051-1o for gcvg-git-2@lo.gmane.org; Wed, 29 Dec 2010 02:01:05 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753163Ab0L2BA4 (ORCPT ); Tue, 28 Dec 2010 20:00:56 -0500 Received: from mail-pw0-f46.google.com ([209.85.160.46]:36500 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751993Ab0L2BAz (ORCPT ); Tue, 28 Dec 2010 20:00:55 -0500 Received: by pwj3 with SMTP id 3so1096461pwj.19 for ; Tue, 28 Dec 2010 17:00:55 -0800 (PST) Received: by 10.142.86.7 with SMTP id j7mr11459950wfb.299.1293584454132; Tue, 28 Dec 2010 17:00:54 -0800 (PST) Received: from zreba.local (92-52-237-24.gci.net [24.237.52.92]) by mx.google.com with ESMTPS id x18sm20043084wfa.11.2010.12.28.17.00.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 28 Dec 2010 17:00:52 -0800 (PST) Received: from zreba.local (localhost [127.0.0.1]) by zreba.local (Postfix) with ESMTP id DB9883AF575C; Tue, 28 Dec 2010 16:00:48 -0900 (AKST) In-Reply-To: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/23.2 (x86_64-apple-darwin) MULE/6.0 (HANACHIRUSATO) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: At Tue, 28 Dec 2010 14:38:20 -0800 (PST), Jakub Narebski wrote: > > Junio C Hamano writes: > > > I think the basic direction could be (I haven't thought things through, > > just a strawman): > > > > - Allow --verify/--no-verify to all commands that possibly create a new > > commit, and run pre-commit hook where an updated index is about to be > > made into a commit (for some commands this may not be very easy); > > > > - The guideline of picking the default would probably look like this: > > > > (1) for existing commands, keep the current behaviour; > > > > (2) for a new command, --verify should be the default if the command is > > primarily about letting the user do what s/he would/could/should > > have done as "git commit" in the first place (e.g. cherry-picking > > one's own commit from a separate branch or rebasing one's own > > unpublished branch on top of updated upstream), and --no-verify > > otherwise (i.e. taking other's work and using it in a context > > different from the original). > > Does it mean that for now (and perhaps also for later) it means that > "git commit" by default runs pre-commit hook, unless one use > --no-verify, and that all comands that create a new commit (rebase, > cherry-pick, revert, merge/pull) can request for pre-commit hook to be > run (if they create commit) with --verify? > > I think it is a very good idea +1! -- Dave Abrahams BoostPro Computing http://www.boostpro.com