From: Jeff King Date: Wed, 25 Jan 2017 21:15:30 GMT Subject: Re: [PATCH] mingw: allow hooks to be .exe files Message-ID: <20170125211529.jq4halip4ndbff5k@sigill.intra.peff.net> In-Reply-To: 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