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

Re: [PATCH 08/14] help.c: Fix detection of custom merge strategy on cygwin

From
Johannes Sixt <j6t@kdbg.org>
Date
Dec 14, 2010, 20:38 UTC
Message-ID
<201012142138.37679.j6t@kdbg.org>
In-Reply-To
<4D07B786.2060602@ramsay1.demon.co.uk>
On Dienstag, 14. Dezember 2010, Ramsay Jones wrote:
Show 12 quoted lines
> @@ -126,7 +126,10 @@ static int is_executable(const char *name)
>  	    !S_ISREG(st.st_mode))
>  		return 0;
>
> -#ifdef WIN32
> +#if defined(WIN32) || defined(__CYGWIN__)
> +#if defined(__CYGWIN__)
> +if ((st.st_mode & S_IXUSR) == 0)
> +#endif
>  {	/* cannot trust the executable bit, peek into the file instead */
>  	char buf[3] = { 0 };
>  	int n;
Do you gain a lot by this extra condition? Wouldn't

-#ifdef WIN32 +#if defined(WIN32) || defined(__CYGWIN__)

be sufficient?
-- Hannes
Previous: Erik Faye-LundNext: Ramsay Jones
Message 5 of 8 in “help.c: Fix detection of custom merge strategy on cygwin”
  1. 08/14 help.c: Fix detection of custom merge strategy on cygwinRamsay Jones, Dec 14, 2010
  2. Erik Faye-LundDec 14, 2010
  3. Ramsay JonesDec 16, 2010
  4. Erik Faye-LundDec 16, 2010
  5. Johannes SixtDec 14, 2010
  6. Ramsay JonesDec 16, 2010
  7. Johannes SixtDec 17, 2010
  8. Ramsay JonesDec 18, 2010

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.