From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 582171F6DC for ; Wed, 25 Jan 2017 21:15:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751598AbdAYVPd (ORCPT ); Wed, 25 Jan 2017 16:15:33 -0500 Received: from cloud.peff.net ([104.130.231.41]:44784 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750930AbdAYVPc (ORCPT ); Wed, 25 Jan 2017 16:15:32 -0500 Received: (qmail 3388 invoked by uid 109); 25 Jan 2017 21:15:32 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.84) with SMTP; Wed, 25 Jan 2017 21:15:32 +0000 Received: (qmail 15923 invoked by uid 111); 25 Jan 2017 21:15:31 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.84) with SMTP; Wed, 25 Jan 2017 16:15:31 -0500 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Wed, 25 Jan 2017 16:15:30 -0500 Date: Wed, 25 Jan 2017 16:15:30 -0500 From: Jeff King To: Johannes Schindelin Cc: git@vger.kernel.org, Junio C Hamano Subject: Re: [PATCH] mingw: allow hooks to be .exe files Message-ID: <20170125211529.jq4halip4ndbff5k@sigill.intra.peff.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Jan 25, 2017 at 05:58:42PM +0100, Johannes Schindelin wrote: > This change is necessary to allow the files in .git/hooks/ to optionally > have the file extension `.exe` on Windows, as the file names are > hardcoded otherwise. Make sense as a goal. > - if (access(path.buf, X_OK) < 0) > + if (access(path.buf, X_OK) < 0) { > +#ifdef STRIP_EXTENSION > + strbuf_addstr(&path, ".exe"); I think STRIP_EXTENSION is a string. Should this line be: strbuf_addstr(&path, STRIP_EXTENSION); ? -Peff