From: Jan Hudec <bulb@ucw.cz>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Cc: David Kastrup <dak@gnu.org>, Paolo Teti <paolo.teti@gmail.com>,
git@vger.kernel.org
Subject: Re: git-rebase (1.5.0.6) errors
Date: Sun, 20 May 2007 14:43:45 +0200 [thread overview]
Message-ID: <20070520124345.GB27087@efreet.light.src> (raw)
In-Reply-To: <Pine.LNX.4.64.0705181640270.14736@kivilampi-30.cs.helsinki.fi>
[-- Attachment #1: Type: text/plain, Size: 1789 bytes --]
On Fri, May 18, 2007 at 17:02:56 +0300, Ilpo Järvinen wrote:
> David Kastrup <dak@gnu.org> wrote:
>
> > Only if size_t is a larger type than int (could be on x86-64 and alpha
> > architectures). Other than that, this comparison would work. Which
> > does not mean that this does not warrant fixing, but it is not
> > necessarily the cause of this problem.
>
> ...sizeof(size_t) == sizeof(int) should hold...
Really?
$ cat test.c
#include <stdio.h>
int main(void)
{
printf("sizeof(int) = %i\n", sizeof(int));
printf("sizeof(long) = %i\n", sizeof(long));
printf("sizeof(size_t) = %i\n", sizeof(size_t));
return 0;
}
$ gcc -otest test.c
$ ./test
sizeof(int) = 4
sizeof(long) = 8
sizeof(size_t) = 8
Hm, it does not seem that sizeof(size_t) == sizeof(int).
$ uname -m
x86_64
Yes, this is a 64-bit system.
Anyway, comparing it with -1 is ALWAYS OK in spite of this!
$ cat test2.c
#include <stdio.h>
int main(void)
{
size_t x = 0;
--x;
printf("x = 0x%lx\n", x);
printf("(x == -1) = %i\n", (x == -1));
return 0;
}
$ gcc -otest2 test2.c
$ ./test2
x = 0xffffffffffffffff
(x == -1) = 1
So at least with gcc that comparison is OK anyway. There has to be something
else that causes that problem.
> Anyway, if this has any relevance: I'm using non-utf system, and (as you
> see) my surname has ä... The system was recently upgraded to git 1.5+
> which started to complain also about a missing i18n.commitencoding,
> figured out that when I set it to utf8 (empty => defaults to it) and have
> signed-off line (with native non-utf ä), I get that error...
>
> ...and please, do not drop me from cc since I'm not subscribed...
>
> --
> i.
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-05-20 12:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-18 8:47 git-rebase (1.5.0.6) errors Ilpo Järvinen
2007-05-18 10:31 ` Paolo Teti
2007-05-18 10:49 ` David Kastrup
2007-05-18 11:29 ` Paolo Teti
2007-05-18 14:02 ` Ilpo Järvinen
2007-05-18 14:39 ` Paolo Teti
[not found] ` <864pmamb6b.fsf@lola.quinscape.zz>
2007-05-18 15:08 ` Paolo Teti
2007-05-20 12:43 ` Jan Hudec [this message]
2007-05-20 19:02 ` Ilpo Järvinen
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=20070520124345.GB27087@efreet.light.src \
--to=bulb@ucw.cz \
--cc=dak@gnu.org \
--cc=git@vger.kernel.org \
--cc=ilpo.jarvinen@helsinki.fi \
--cc=paolo.teti@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).