Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 45B47431FB6 for ; Tue, 26 Mar 2013 02:18:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gNVPsOnWFYb7 for ; Tue, 26 Mar 2013 02:18:24 -0700 (PDT) Received: from mail-we0-f173.google.com (mail-we0-f173.google.com [74.125.82.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 24293431FAF for ; Tue, 26 Mar 2013 02:18:24 -0700 (PDT) Received: by mail-we0-f173.google.com with SMTP id t57so1775938wey.18 for ; Tue, 26 Mar 2013 02:18:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:in-reply-to:references:user-agent :date:message-id:mime-version:content-type:x-gm-message-state; bh=fzSu1e20Ut6ClSFOpn5pPQk1CiKq+I34uX8qzt/SOCo=; b=ebgFGms3eZ8KkyCyZ6B/ABaZSeD70sU6CeF8o/7C7iDxdYzk/jWwhTi9uaWTFKK1R0 rUL7oZxcKf9zrpreLeqWFqsbjtp39bL5FRbHLtSKNg1FIQmzjaYzH2Wf7bEIoZ9ZuoSu /fOmvV/bAaX5VFqMmCLk1/BZn7ucWJo82M4hERAUC6d99tHlZueUnEYmAu5aB9cGHB9x SOASqMOixTkSz66QZQOf/ElrwV+0JDde3EmHl+oL8vCe9I3BK9BaAbZ85MgTgpmuHuok i0jBbG0Ju7w0mgtZvc/DdCDWZSo9WKgE3Vgysi44dON0TDO8CNs19fLehV7cVfk4niUI Cwfg== X-Received: by 10.180.73.6 with SMTP id h6mr1708635wiv.27.1364289501718; Tue, 26 Mar 2013 02:18:21 -0700 (PDT) Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3]) by mx.google.com with ESMTPS id t7sm1766790wij.2.2013.03.26.02.18.19 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 26 Mar 2013 02:18:20 -0700 (PDT) From: Jani Nikula To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH 1/1] devel/STYLE: information how to enable standard pre-commit hook In-Reply-To: <1364040435-22357-1-git-send-email-tomi.ollila@iki.fi> References: <1364040435-22357-1-git-send-email-tomi.ollila@iki.fi> User-Agent: Notmuch/0.15.2+34~ga90fdd9 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Tue, 26 Mar 2013 10:18:11 +0100 Message-ID: <87ppymfrjg.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQmzQ0TAj3Ez/AmJQKu15IcOKSxhCbKtRNft8k1mwqhlNOd7TZ4ekbUas04FZrtFWdZT6VJD Cc: tomi.ollila@iki.fi X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2013 09:18:25 -0000 On Sat, 23 Mar 2013, Tomi Ollila wrote: > It is easier to enable git standard pre-commit hook, when the > operation to do so is presented. > --- > devel/STYLE | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/devel/STYLE b/devel/STYLE > index 0792ba1..92de42c 100644 > --- a/devel/STYLE > +++ b/devel/STYLE > @@ -45,8 +45,9 @@ function (param_type param, param_type param) > - likewise, there is a space following keywords such as if and while > - every binary operator should have space on either side. > > -* No trailing whitespace. Please enable the standard pre-commit hook > - in git (or an equivalent hook). > +* No trailing whitespace. Please enable the standard pre-commit hook in git > + (or an equivalent hook). The standard pre-commit hook is enabled by simply > + renaming file '.git/hooks/pre-commit.sample' to '.git/hooks/pre-commit' . Or just refer to http://git-scm.com/book/en/Customizing-Git-Git-Hooks or man githooks if you really need to. Older versions of git used to have properly named hooks with the executable bit unset... Personally I wouldn't ask anyone to enable the hook because I wouldn't enable it in the first place. There's $EDITOR and 'git diff --check' to do that kind of thing... When I want to commit I want to commit, warts and all, and I don't want a hook to prevent me from doing so! BR, Jani.