From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Pieter de Bie <pdebie@ai.rug.nl>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailinglist <git@vger.kernel.org>
Subject: Re: [PATCH v2] builtin-fast-export: Add importing and exporting of revision marks
Date: Sat, 7 Jun 2008 16:19:35 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.1.00.0806071612460.1783@racer> (raw)
In-Reply-To: <DB158BDE-70D1-4779-9B03-A85C60EB2FA7@ai.rug.nl>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1261 bytes --]
Hi,
On Sat, 7 Jun 2008, Pieter de Bie wrote:
> On 7 jun 2008, at 01:09, Junio C Hamano wrote:
>
> >I am confused.
> >
> >The type of object_decoration.decorattion is a (void*). Why isn't it
> >sufficient to do it in a naïve and straightforward way?
> >
> > mark = (uint32_t)(deco->decoration);
> > add_decoration(&idnums, object, (void*) mark);
> >
> >Is this twisted pointer arithmetic done in order to avoid cast between
> >int and pointer of different size in the code?
Yes, it was done in response to a remark that pointers might not be
allowed to be unaligned.
> I'm not sure why this is done; I simply copied what the existing code
> already did.
Okay, I looked again, and indeed, you _copied_ it. Instead of using the
functions mark_object() and get_object_mark() which are there only to be
used by you.
So please fix.
> >Even if that is the case, doesn't "(uint32_t *)deco->decoration -
> >(uint32_t *)NULL" mean the value range for deco->decoration is
> >one-fourth of U32?
It is. But since every object needs already at least 20 bytes, and we do
not even have the complete address space to put objects into, and we do
not plan to support 64-bit only repositories, I think we are fine. At
least for the moment.
Ciao,
Dscho
next prev parent reply other threads:[~2008-06-07 15:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-04 20:55 [PATCH] builtin-fast-export: Add importing and exporting of revision marks Pieter de Bie
2008-06-05 0:00 ` Johannes Schindelin
2008-06-05 10:46 ` Pieter de Bie
2008-06-05 10:52 ` [PATCH v2] " Pieter de Bie
2008-06-05 13:35 ` Johannes Schindelin
2008-06-06 23:09 ` Junio C Hamano
2008-06-07 13:06 ` Pieter de Bie
2008-06-07 15:19 ` Johannes Schindelin [this message]
2008-06-07 16:37 ` Junio C Hamano
2008-06-11 19:45 ` Johannes Schindelin
2008-06-07 13:25 ` [PATCH] Documentation/fast-export: Document --import-marks and --export-marks options Pieter de Bie
2008-06-07 15:20 ` Johannes Schindelin
2008-06-10 6:47 ` Junio C Hamano
2008-06-11 11:17 ` [PATCH v3] builtin-fast-export: Add importing and exporting of revision marks Pieter de Bie
2008-06-11 11:24 ` Pieter de Bie
2008-06-11 18:45 ` Johannes Schindelin
2008-06-11 21:43 ` Junio C Hamano
2008-06-05 13:31 ` [PATCH] " 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=alpine.DEB.1.00.0806071612460.1783@racer \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pdebie@ai.rug.nl \
/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