Thread (5 messages) flat view 5 messages, 2 authors, 2017-01-30

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

From: Jeff King <hidden>
Date: 2017-01-25 21:15:42

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help