gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] using sha1 as explicit id


From: Robert Collins
Subject: Re: [Gnu-arch-users] using sha1 as explicit id
Date: Sun, 02 May 2004 10:18:38 +1000

On Fri, 2004-04-30 at 18:30, Martin Pool wrote:
> On 28 Apr 2004, Aaron Bentley <address@hidden> wrote:
> > Colin Walters wrote:
> > >Hi,
> > >
> > >I was wondering - why not just use a SHA1 hash as the file identity for
> > >explicit IDs?  That way if two people independently import the same
> > >version of a project into arch, they would be able to apply patches from
> > >one another, etc.
> > 
> > But if you have two files with the same contents, won't you get 
> > duplicate IDs?
> 
> You would.  
> 
> Perhaps a better way would be to use the initial path of the file as
> an explicit id, so it's almost like names tagging that can later
> support moves.  If two people imported a package using the same scheme
> they could later merge.  However it could cause clashes at a later
> date.

Like (for instance) /configure.in ? :}. I think a aggregate id would
work though: tla add-id $path "$path-$(sha1sum $path)"

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]