git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Sergio Callegari <sergio.callegari@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Question about --tree-filter
Date: Thu, 05 Feb 2009 14:57:03 +0100	[thread overview]
Message-ID: <498AF02F.4020609@viscovery.net> (raw)
In-Reply-To: <loom.20090205T123832-998@post.gmane.org>

Sergio Callegari schrieb:
> Johannes Sixt <j.sixt <at> viscovery.net> writes:
>> [ Don't cull Cc list, please! ]

By this I actually meant that you should "Reply to All", not just the
mailing list.

> When you say "at the end it updates the index file" do you mean the effect of
> the -u switch?

I think so.

> And when you say "Some files have the same timestamp as the index file" do you
> mean that diff-index uses the stat info inside the index only if a file is "<"
> than the index otherwise it is directly assumed that the file is changed wrt the
> index content? If so, would it make sense to re-touch the index after the
> checkout -u so that after the checkout the index is always > than every file it
> contains and one always starts at a non-racy situation?

No. The "racy" situation is not something that is bad. It's merely a
situation where git cannot decide from stat information alone whether a
file was changed or not. So it plays safe, and looks also at the content.

But if you lie about the index's timestamp, then git will think that all
files are up-to-date.

> With this, one could
> only explicitly touch those files that need to get (re)filtered and gain in
> efficiency... or am I still missing something?

No, you cannot if you are on a "fast" machine, where the touch happens in
the same second that the index file was written. But you can wait one
second before you touch the files. Depending on the volume of your total
data, this might actually be faster as long as you touch only selected files.

-- Hannes

      reply	other threads:[~2009-02-05 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04 16:08 Question about --tree-filter Sergio Callegari
2009-02-04 16:37 ` Johannes Sixt
2009-02-04 20:42   ` Sergio Callegari
2009-02-05  8:32     ` Johannes Sixt
2009-02-05 13:13       ` Sergio Callegari
2009-02-05 13:57         ` Johannes Sixt [this message]

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

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

  git send-email \
    --in-reply-to=498AF02F.4020609@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=sergio.callegari@gmail.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.
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 NNTP newsgroup(s).