From: "Sean" <seanlkml@sympatico.ca>
To: "Junio C Hamano" <junkio@cox.net>
Cc: "Linus Torvalds" <torvalds@osdl.org>, git@vger.kernel.org
Subject: Re: [PATCH] Introduce SHA1_FILE_DIRECTORIES
Date: Fri, 6 May 2005 20:32:42 -0400 (EDT) [thread overview]
Message-ID: <2721.10.10.10.24.1115425962.squirrel@linux1> (raw)
In-Reply-To: <7vis1vc27f.fsf@assigned-by-dhcp.cox.net>
On Fri, May 6, 2005 8:24 pm, Junio C Hamano said:
>>>>>> "S" == Sean <seanlkml@sympatico.ca> writes:
>
> S> has_sha1_file can be reduced to:
>
> S> int has_sha1_file(const unsigned char *sha1)
> S> {
> S> return (!!find_sha1_file(sha1));
> S> }
>
> Not really. If you do not have alternates it does not even
> bother to stat so you get the path that supposed to contain the
> data and you need to do the checking yourself.
>
>
Perhaps I'm just missing something in your code, but this fragment makes
it look to me that stat is always called in find_sha1_file even when there
are no alternates:
+ char *name = sha1_file_name(sha1);
[...]
+ if (!stat(name, &st))
+ return name;
+ for (i = 0; i < num_alt; i++) {
Sean
next prev parent reply other threads:[~2005-05-07 0:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-06 23:35 [PATCH] Introduce SHA1_FILE_DIRECTORIES Junio C Hamano
2005-05-07 0:20 ` Sean
2005-05-07 0:24 ` Junio C Hamano
2005-05-07 0:32 ` Sean [this message]
2005-05-07 6:31 ` Junio C Hamano
2005-05-07 19:51 ` Junio C Hamano
2005-05-09 13:33 ` H. Peter Anvin
2005-05-09 16:38 ` Junio C Hamano
2005-05-09 16:41 ` Sean
2005-05-09 18:03 ` H. Peter Anvin
2005-05-09 18:50 ` Junio C Hamano
2005-05-09 20:05 ` [RFC] Renaming environment variables Junio C Hamano
2005-05-09 20:15 ` Thomas Glanzmann
2005-05-10 0:32 ` Petr Baudis
2005-05-09 21:04 ` Sean
2005-05-09 23:08 ` Daniel Barkalow
2005-05-10 0:09 ` Junio C Hamano
2005-05-10 0:13 ` Petr Baudis
2005-05-10 0:22 ` Junio C Hamano
2005-05-10 0:27 ` Petr Baudis
2005-05-10 0:38 ` Daniel Barkalow
2005-05-10 0:44 ` Petr Baudis
2005-05-10 0:53 ` Daniel Barkalow
2005-05-10 5:45 ` Junio C Hamano
2005-05-10 6:25 ` Introducing GIT_DIR environment variable Junio C Hamano
2005-05-10 23:39 ` Alex Riesen
2005-05-10 2:16 ` [RFC] Renaming environment variables Junio C Hamano
2005-05-10 3:23 ` Daniel Barkalow
2005-05-10 0:25 ` Petr Baudis
2005-05-10 1:02 ` Junio C Hamano
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=2721.10.10.10.24.1115425962.squirrel@linux1 \
--to=seanlkml@sympatico.ca \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.