git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Keith Goldfarb <keith@blackthorn-media.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Marius Storm-Olsen <marius@storm-olsen.com>
Subject: Re: Git on Windows maps creation time onto changed time
Date: Fri, 2 Feb 2018 00:22:07 +0100	[thread overview]
Message-ID: <CACBZZX7=NKKYMTmQNe8JqjPqZF6kYsw7k+UpFkgZGhFModpr1g@mail.gmail.com> (raw)
In-Reply-To: <CCB76F06-DBA9-4342-8830-402F8AF9854A@blackthorn-media.com>

On Fri, Feb 2, 2018 at 12:10 AM, Keith Goldfarb
<keith@blackthorn-media.com> wrote:
> Dear git,
>
> While tracking down a problem with a filesystem shared by Windows and Ubuntu, I came across the following code in compat/mingw.c (ming_fstat(), also in do_lstat()):
>
>         if (GetFileInformationByHandle(fh, &fdata)) {
>                 buf->st_ino = 0;
>                 buf->st_gid = 0;
>                 buf->st_uid = 0;
>                 buf->st_nlink = 1;
>                 buf->st_mode = file_attr_to_st_mode(fdata.dwFileAttributes);
>                 buf->st_size = fdata.nFileSizeLow |
>                         (((off_t)fdata.nFileSizeHigh)<<32);
>                 buf->st_dev = buf->st_rdev = 0; /* not used by Git */
>                 buf->st_atime = filetime_to_time_t(&(fdata.ftLastAccessTime));
>                 buf->st_mtime = filetime_to_time_t(&(fdata.ftLastWriteTime));
>                 buf->st_ctime = filetime_to_time_t(&(fdata.ftCreationTime));
>                 return 0;
>         }
>
> The assignment of buf->st_ctime doesn’t seem right to me. I understand there’s no good choice here, but I think a better choice would be to duplicate the definition used for st_mtime.
>
> Background: When I do a git status on Windows and then later on Ubuntu (or the other order), it is extremely slow, as the entire tree is being traversed. I tracked it down to this difference in definition of c_time. Yes, I know about the core.trustctime variable, but my problem aside this seems like an unwise choice.
>
> Thanks for listening,

Let's CC Marius Storm-Olsen who added this behavior (CC'd).

  reply	other threads:[~2018-02-01 23:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01 23:10 Git on Windows maps creation time onto changed time Keith Goldfarb
2018-02-01 23:22 ` Ævar Arnfjörð Bjarmason [this message]
2018-02-02 17:38 ` Johannes Sixt
2018-02-02 18:45   ` Keith Goldfarb
2018-02-02 21:18     ` Johannes Schindelin
2018-02-02 22:44       ` Keith Goldfarb
2018-02-02 23:01         ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACBZZX7=NKKYMTmQNe8JqjPqZF6kYsw7k+UpFkgZGhFModpr1g@mail.gmail.com' \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=keith@blackthorn-media.com \
    --cc=marius@storm-olsen.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).