git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ben Lynn" <benlynn@gmail.com>
To: "Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Daniel Barkalow" <barkalow@iabervon.org>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: git bugs
Date: Wed, 11 Jun 2008 10:52:32 -0700	[thread overview]
Message-ID: <832adb090806111052p32a750c2n5f2d43e0ed1b910d@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.1.10.0806110752550.3101@woody.linux-foundation.org>

> I'm not sure why you think my patch that just did the zero-sized blob
> thing was slow? It's a 20-byte memcmp(). It takes no time at all.

I don't think the memcmp is slow. I think the ce_modified_check_fs in:

smudge() {
   ...
  if (ce_match_stat_basic(ce, &st))
                return;
  if (ce_modified_check_fs(ce, &st))
                ce->ce_size = 0;
}

is potentially slow, and I'm saying you could replace it with

smudge() {
   ...
  if (ce_match_stat_basic(ce, &st))
                return;
  ce->ce_size = ~0;
}

to avoid the ce_modified_check_fs call. But it is an unclean solution,
which is why I champion having an extra flag per file.

Also, I think we could set ce->ce_size to ~0 when we first realize
timestamp = mtime, and we'd no longer have to do index-wide smudging
on writes.

Thanks for the explanation by the way. I get why you can't modify the
SHA1. It is indeed what we asked git to record, right or wrong. I got
confused because I misread the code and thought ce_modified_check_fs()
would write the new SHA1 to disk.

-Ben

  reply	other threads:[~2008-06-11 17:53 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10  8:41 git bugs Ben Lynn
2008-06-10 16:58 ` Daniel Barkalow
2008-06-10 17:44 ` Linus Torvalds
2008-06-10 18:45   ` Ben Lynn
2008-06-10 20:06     ` Linus Torvalds
2008-06-10 23:09       ` Ben Lynn
2008-06-10 23:38         ` Junio C Hamano
2008-06-11  0:02           ` Ben Lynn
2008-06-11  0:20             ` Junio C Hamano
2008-06-11  0:24               ` Ben Lynn
2008-06-11  0:53                 ` Ben Lynn
2008-06-11 12:46                 ` Stephen R. van den Berg
2008-06-12  6:51                   ` Ben Lynn
2008-06-11  1:36             ` Linus Torvalds
2008-06-11  2:04               ` Ben Lynn
2008-06-11  2:12                 ` Linus Torvalds
2008-06-11  2:31                   ` Ben Lynn
2008-06-11  2:39                     ` Linus Torvalds
2008-06-11  5:58                       ` Ben Lynn
2008-06-11  6:18                         ` Ben Lynn
2008-06-11 14:54                           ` Linus Torvalds
2008-06-11 17:52                             ` Ben Lynn [this message]
2008-06-11 18:10                               ` Linus Torvalds
2008-06-11 18:48                                 ` Ben Lynn
2008-06-11 18:53                                   ` Linus Torvalds
2008-06-11 20:57                                     ` Ben Lynn
2008-06-11 21:50                                     ` Junio C Hamano
2008-06-11 14:52                         ` Linus Torvalds
2008-06-12 20:06   ` Junio C Hamano
2008-06-13 10:10   ` Jeff King
2008-06-13 23:09     ` Junio C Hamano
2008-06-14  6:25       ` Jeff King
2008-06-12  3:17 ` Shawn O. Pearce
2008-06-12  6:46   ` Ben Lynn
2008-06-12  7:12   ` Johannes Schindelin
  -- strict thread matches above, loose matches on Subject: below --
2017-02-23 20:27 Sean Hunt
2017-02-24 16:52 ` 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

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

  git send-email \
    --in-reply-to=832adb090806111052p32a750c2n5f2d43e0ed1b910d@mail.gmail.com \
    --to=benlynn@gmail.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=torvalds@linux-foundation.org \
    /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).