Re: Will git have a baseline feature or something alike?

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

 



Jakub Narebski <jnareb@xxxxxxxxx> wrote:
> Eyvind Bernhardsen wrote:
> >
> > Okay, as a git n00b I'm probably on completely the wrong track, but if  
> > you made a git repository out of a kernel tarball (cd linux-2.6.24 &&  
> > git init && git add .) and then did a shallow fetch from kernel.org  
> > into that repository, wouldn't the blobs you added get reused  
> > (assuming the tarball you downloaded was fairly recent), thus reducing  
> > the amount of data fetch has to transfer?
> 
> I think it wouldn't. If I understand it correctly, the fetching engine
> deals only with commits. If you have commit, it assumes that you have 
> tree, blobs, and ancestors. If you don't have commit, it assumes that 
> you don't have tree and blobs.

Correct.

I was thinking about this just yesterday.  I think that if we
embedded inside of a tarball created by git-archive the raw sources
of all files, plus the commit SHA-1 and the raw body of that commit,
it should be possible to convert that into a shallow clone.

Unfortunately I think it is possible for git-archive to edit a file
in-place during export, e.g. to edit an RPM spec file and insert
the revision.  That would damage the tree, as the blobs would no
longer hash to the same value as they should be in that commit.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux