From: Jeff King <peff@peff.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
Git Mailing List <git@vger.kernel.org>,
Stefan Beller <sbeller@google.com>,
Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: Pack files, standards compliance, and efficiency
Date: Fri, 5 Jun 2015 06:36:39 -0400 [thread overview]
Message-ID: <20150605103639.GB19033@peff.net> (raw)
In-Reply-To: <CACsJy8CnWo=s1onqY33K+DwFmB1baQ-uwu9Fbwm+UB30kDTwQw@mail.gmail.com>
On Fri, Jun 05, 2015 at 05:14:25PM +0700, Duy Nguyen wrote:
> I'm more concerned about breaking object_id abstraction than C
> standard. Let's think a bit about future. I suppose we need to support
> both sha-1 and sha-512, at least at the source code level.
I think that's going to be a much bigger issue, because we are casting
out of a defined, on-disk data structure here. So I'd rather defer any
code changes around this until we see what the new data structure (and
the new code) look like.
> That might make casting tricky. Maybe we should deal with it now
> instead of delaying because if the final solution is vastly different,
> we may be redoing this conversion again. In any case, if we cast, we
> should make it grep-able (maybe hide the casting in a macro so we can
> grep the macro's name) so we can examine them when the time comes for
> us to move away from sha-1.
I think that is sensible. Something like:
#define SHA1_TO_OBJID(sha1) ((struct object_id *)sha1)
would probably be a good start.
-Peff
next prev parent reply other threads:[~2015-06-05 10:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 1:41 Pack files, standards compliance, and efficiency brian m. carlson
2015-06-05 9:45 ` Jeff King
2015-06-05 10:14 ` Duy Nguyen
2015-06-05 10:36 ` Jeff King [this message]
2015-06-05 13:24 ` Duy Nguyen
2015-06-05 19:59 ` brian m. carlson
2015-06-05 16:43 ` Junio C Hamano
2015-06-05 15:22 ` Michael Haggerty
2015-06-05 19:42 ` brian m. carlson
2015-06-05 20:03 ` Michael Haggerty
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=20150605103639.GB19033@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
--cc=pclouds@gmail.com \
--cc=sandals@crustytoothpaste.net \
--cc=sbeller@google.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).