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

Re: [PATCH] compat/cygwin.c - Use cygwin's stat if core.filemode == true

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Oct 12, 2008, 13:39 UTC
Message-ID
<20081012133934.GB21650@dpotapov.dyndns.org>
In-Reply-To
<1223765806-3332-1-git-send-email-mlevedahl@gmail.com>
On Sat, Oct 11, 2008 at 06:56:46PM -0400, Mark Levedahl wrote:
Show 13 quoted lines
> diff --git a/compat/cygwin.c b/compat/cygwin.c
> index 423ff20..1fed265 100644
> --- a/compat/cygwin.c
> +++ b/compat/cygwin.c
> @@ -91,13 +91,20 @@ static int cygwin_stat(const char *path, struct stat *buf)
>   * functions should be used. The choice is determined by core.ignorecygwinfstricks.
>   * Reading this option is not always possible immediately as git_dir may be
>   * not be set yet. So until it is set, use cygwin lstat/stat functions.
> + * However, if core.filemode is true, we *must* use the Cygwin posix stat as
> + * the Windows stat fuctions do not determine posix filemode.
>   */
>  static int native_stat = 1;
> +static int core_filemode = 0;

Is it a reason to add a new variable instead of using trust_executable_bit? And if so, why its default value is different? I know that this default does not matter usually, because core.filemode is always stored in .git/config, but still I don't like this discrapency.

Otherwise, I don't have any objection to this patch.
Dmitry
Previous: Mark LevedahlNext: Mark Levedahl
Message 5 of 11 in “compat/cygwin.c - Use cygwin's stat if core.filemode == true”
  1. compat/cygwin.c - Use cygwin's stat if core.filemode == trueMark Levedahl, Oct 11, 2008
  2. compat/cygwin.c - Use cygwin's stat if core.filemode == trueMark Levedahl, Oct 11, 2008
  3. Junio C HamanoOct 11, 2008
  4. compat/cygwin.c - Use cygwin's stat if core.filemode == trueMark Levedahl, Oct 11, 2008
  5. Dmitry PotapovOct 12, 2008
  6. compat/cygwin.c - Use cygwin's stat if core.filemode == trueMark Levedahl, Oct 12, 2008
  7. Junio C HamanoOct 12, 2008
  8. Mark LevedahlOct 12, 2008
  9. Junio C HamanoOct 12, 2008
  10. Mark LevedahlOct 13, 2008
  11. compat/cygwin.c - Use cygwin's stat if core.filemode == trueMark Levedahl, Oct 13, 2008

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.