Thread (1 message) 1 message, 1 author, 2017-01-25

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

From: Junio C Hamano <hidden>
Date: 2017-01-25 21:39:51

Jeff King [off-list ref] writes:
On Wed, Jan 25, 2017 at 05:58:42PM +0100, Johannes Schindelin wrote:
quoted
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.
quoted
-	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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help