git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marco Costalba" <mcostalba@gmail.com>
To: "Andy Parkins" <andyparkins@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Why SHA are 40 bytes? (aka looking for flames)
Date: Sat, 21 Apr 2007 18:58:29 +0200	[thread overview]
Message-ID: <e5bfff550704210958j5506d533wa20834b9862457fd@mail.gmail.com> (raw)
In-Reply-To: <200704211608.06171.andyparkins@gmail.com>

On 4/21/07, Andy Parkins <andyparkins@gmail.com> wrote:
> On Saturday 2007, April 21, Marco Costalba wrote:
> > Well, why to store always the full length SHA?
>
> Well apart from being easier than working out the optimum size for every
> single object write, one really good reason would be that there is no
> way to predict that an object in the future won't have a conflicting
> SHA - every object /has/ to be stored with its full hash, because you
> are preventing conflicts with everything object now, in the past and
> all possible futures.
>

Well, this is true also with 40 bytes sha, also if less probable.

Apart from this, when, in the future you are going to add an object
that conflicts with an existing one you will handle that situation for
the *new* object, as example storing with longer sha, without touching
the existing one anymore.

Well I admit I don't know exacting what I'm saying, but sometimes
ingenuity (a kind word to say ignorance) could lead to some surprises.

Marco

  parent reply	other threads:[~2007-04-21 16:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-21 13:35 Why SHA are 40 bytes? (aka looking for flames) Marco Costalba
2007-04-21 15:08 ` Andy Parkins
2007-04-21 16:53   ` Karl Hasselström
2007-04-21 17:09     ` Marco Costalba
2007-04-21 16:58   ` Marco Costalba [this message]
2007-04-21 15:37 ` Jon Smirl
2007-04-21 17:06   ` Marco Costalba
2007-04-21 17:59     ` Jon Smirl
2007-04-21 18:28       ` Marco Costalba
2007-04-21 19:36         ` Jon Smirl
2007-04-24 14:48         ` Andreas Ericsson
2007-04-24 15:04           ` Nicolas Pitre
2007-04-24 15:18             ` Andreas Ericsson
2007-04-24 16:19               ` Nicolas Pitre
2007-04-22 13:27     ` Nicolas Pitre
2007-04-24  0:46       ` H. Peter Anvin
2007-04-24  2:30         ` Shawn O. Pearce
2007-04-24  2:44         ` Nicolas Pitre

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=e5bfff550704210958j5506d533wa20834b9862457fd@mail.gmail.com \
    --to=mcostalba@gmail.com \
    --cc=andyparkins@gmail.com \
    --cc=git@vger.kernel.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.
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).