git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mingw: allow hooks to be .exe files

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 25, 2017, 21:39 UTC
Message-ID
<xmqqy3xy95un.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170125211529.jq4halip4ndbff5k@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 18 quoted lines
> 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);
>
> ?

Yup, I think that is more in line with how git.c (the other user of the macro) uses it.

Previous: Jeff KingNext: Johannes Schindelin
Message 3 of 13 in “mingw: allow hooks to be .exe files”
  1. mingw: allow hooks to be .exe filesJohannes Schindelin, Jan 25, 2017
  2. Jeff KingJan 25, 2017
  3. Junio C HamanoJan 25, 2017
  4. Johannes SchindelinJan 26, 2017
  5. Junio C HamanoJan 26, 2017
  6. Johannes SchindelinJan 27, 2017
  7. Stefan BellerJan 27, 2017
  8. Johannes SchindelinJan 30, 2017
  9. Junio C HamanoJan 25, 2017
  10. Johannes SchindelinJan 26, 2017
  11. mingw: allow hooks to be .exe filesJohannes Schindelin, Jan 26, 2017
  12. mingw: allow hooks to be .exe filesJohannes Schindelin, Jan 30, 2017
  13. Junio C HamanoJan 30, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.