git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Petr Baudis <pasky@ucw.cz>
Cc: Linus Torvalds <torvalds@osdl.org>, git@vger.kernel.org
Subject: Re: [PATCH] Use correct U*MAX.
Date: Fri, 03 Jun 2005 17:09:56 -0700	[thread overview]
Message-ID: <7vslzzj82z.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20050604000042.GG13093@pasky.ji.cz> (Petr Baudis's message of "Sat, 4 Jun 2005 02:00:42 +0200")

>>>>> "PB" == Petr Baudis <pasky@ucw.cz> writes:

>> I'd rather see it use the correct U*MAX.

PB> Care to elaborate? It doesn't make sense to me to use any U*MAX stuff
PB> there whatsoever. (And how do you define the "correct" U*MAX anyway?)

It just feels wrong to spell a parameter to the function
locate_size_cache() "-1" when I know the argument it expects is
of type unsigned long.  And correct U*MAX for that case is
obviously ULONG_MAX, _assuming_ that you agree to the function's
(unwritten) calling convention of "passing the largest possible
value to me means 'do not create', not 'you are telling me that
sha1 is such a large file'".

If you feel strongly about that calling convention, you could
rewrite it to take the third argument "int do_not_create" and
pass that information separately, which is conceptually cleaner.
I just did not think that was worth it for such an internal
helper when I wrote it.


  reply	other threads:[~2005-06-04  0:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7vy89ums2l.fsf@assigned-by-dhcp.cox.net>
2005-06-01 18:38 ` [PATCH] diff: mode bits fixes Junio C Hamano
2005-06-02 16:46   ` [PATCH] Handle deltified object correctly in git-*-pull family Junio C Hamano
2005-06-02 17:03     ` Linus Torvalds
2005-06-02 18:55       ` Junio C Hamano
2005-06-02 21:31         ` Nicolas Pitre
2005-06-02 21:36           ` Nicolas Pitre
2005-06-02 22:19             ` [PATCH 1/2] " Junio C Hamano
2005-06-02 22:48               ` Linus Torvalds
2005-06-02 22:20             ` [PATCH 2/2] Find size of SHA1 object without inflating everything Junio C Hamano
2005-06-02 18:57       ` [PATCH] " Junio C Hamano
2005-06-02 22:10         ` Linus Torvalds
2005-06-02 22:47           ` Junio C Hamano
2005-06-02 17:03     ` [PATCH] Handle deltified object correctly in git-*-pull family McMullan, Jason
2005-06-02 18:02       ` Junio C Hamano
2005-06-02 16:47   ` [PATCH] Use correct U*MAX Junio C Hamano
2005-06-03 23:02     ` Petr Baudis
2005-06-03 23:40       ` Junio C Hamano
2005-06-04  0:00         ` Petr Baudis
2005-06-04  0:09           ` Junio C Hamano [this message]
2005-06-02 16:49   ` [PATCH] Find size of SHA1 object without inflating everything 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

  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=7vslzzj82z.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    --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.
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).