From: Junio C Hamano <junkio@cox.net>
To: Jim Meyering <jim@meyering.net>
Cc: git@vger.kernel.org
Subject: Re: don't accept bogus N in `HEAD~N'
Date: Mon, 22 May 2006 01:16:11 -0700 [thread overview]
Message-ID: <7vr72meapg.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <87psi6h5kv.fsf@rho.meyering.net> (Jim Meyering's message of "Mon, 22 May 2006 09:38:40 +0200")
Jim Meyering <jim@meyering.net> writes:
> Jakub Narebski <jnareb@gmail.com> wrote:
>
>> Jim Meyering wrote:
>>
>>> It'd be better to produce a diagnostic and fail:
I agree with you that we are loose in integer overlaps. Some of
them do matter, some don't. The xrealloc one is, as you said,
borderline, I think, but more serious than this one. This one
is worth fixing only if/because the fix is obvious and does not
hurt the code otherwise (e.g. does not decrease portability,
does not hurt usability, etc.).
>>>
>>> $ ./git-rev-parse --no-flags --sq -- HEAD~18446744073709551616 /dev/null
>>> fatal: ambiguous argument 'HEAD~18446744073709551616': unknown revision or filename
>>
>> Wouldn't it remove ability to say "to the root commit"?
>> One can do it now I guess exactly by specyfying overly large N.
>> Although there should probably be some limit... or not.
>
> Do people really use HEAD~<VERY_LARGE_INTEGER> to refer to the root?
You shouldn't have to care about nor refer to the root commit
that often (if ever) in a real project. It is handy to be able
to refer to it when your repository is very young and you are
toying with git more than you are working on your own project
that is managed by git. But in such a case, finding it once and
tagging it is so easy and efficient that you would not want to
traverse the whole history every time you would want to refer to
it.
In other words, I think Jakub was just joking, and this
particular objection does not qualify as "hurt usability"
criteria I said in the above.
next prev parent reply other threads:[~2006-05-22 8:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-20 22:13 synchronizing incremental git changes to cvs Jim Meyering
2006-05-20 23:05 ` Johannes Schindelin
2006-05-21 13:40 ` Jim Meyering
2006-05-22 16:29 ` Pavel Roskin
2006-05-22 17:05 ` Jakub Narebski
2006-05-21 0:09 ` Martin Langhoff
2006-05-21 16:37 ` Jim Meyering
2006-05-21 18:21 ` Junio C Hamano
2006-05-21 21:31 ` Jim Meyering
2006-05-21 21:35 ` don't accept bogus N in `HEAD~N' Jim Meyering
2006-05-21 21:42 ` Jakub Narebski
2006-05-22 7:38 ` Jim Meyering
2006-05-22 8:16 ` Junio C Hamano [this message]
2006-05-22 8:25 ` Junio C Hamano
2006-05-22 6:57 ` avoid atoi, when possible; int overflow -> heap corruption Jim Meyering
2006-05-22 13:16 ` Morten Welinder
2006-05-22 13:31 ` Jim Meyering
2006-05-22 13:37 ` Jeff King
2006-05-22 13:54 ` Morten Welinder
2006-05-22 10:27 ` detect write failure, even for stdout Jim Meyering
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=7vr72meapg.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=jim@meyering.net \
/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).