Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755570Ab3JaXxJ (ORCPT ); Thu, 31 Oct 2013 19:53:09 -0400 Received: from mail-qa0-f44.google.com ([209.85.216.44]:54111 "EHLO mail-qa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752124Ab3JaXxG (ORCPT ); Thu, 31 Oct 2013 19:53:06 -0400 MIME-Version: 1.0 In-Reply-To: References: <20131024122255.GI9378@mwanda> <20131024122512.GB9534@mwanda> <20131026181709.GB10488@kroah.com> <20131027013402.GA7146@leaf> <526CA7D4.1070904@alum.mit.edu> <20131027071407.GA11683@leaf> <526E283A.1070801@alum.mit.edu> <20131029020824.GE11861@sigill.intra.peff.net> From: Duy Nguyen Date: Fri, 1 Nov 2013 06:52:35 +0700 Message-ID: Subject: Re: [PATCH] commit: Add -f, --fixes option to add Fixes: line To: Junio C Hamano Cc: Johan Herland , Jeff King , Michael Haggerty , Josh Triplett , Git mailing list , Dan Carpenter , Greg KH , Linux Kernel mailing list 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: 1615 Lines: 34 On Fri, Nov 1, 2013 at 12:20 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> OK how about, if $GIT_DIR/hooks/something is a directory, then the >> directory must contain a file named "index", listing all the hooks of >> type "something". All the hooks in "index" will be executed in the >> listing order. > > Hooks that take arbitrary amount of information from the body read > their standard input. How are your multiple hooks supposed to > interact? If each only needs to read a few lines from stdin, they can do so in order. If two hooks need to read till the end of stdin, they are incompatible. If we support some sort of hook signature, we could warn the user when they combine the two. If not, the second's failing (because stdin is already closed) may show the incompatibility. "git hook" should support dry-run mode to test out new combinations. > Hooks that prevent you from doing something stupid signal allow/deny > with their exit code. Do you fail a commit if any of your pre-commit > hook fails, or is it OK to commit as long as one of them says so? > If the former, do all the hooks described in the index still run, or > does the first failure short-cut the remainder? One failed hook fails the commit and stops the remaining from executing. You can skip the hook if you want with --exclude-hooks. -- 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/