Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306545 - git.eclass and clones being both shallow and bare
Summary: git.eclass and clones being both shallow and bare
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Tomáš Chvátal (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-23 17:33 UTC by Michał Górny
Modified: 2010-09-21 17:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The patch to git.eclass (git.eclass.diff,1.49 KB, patch)
2010-02-23 17:34 UTC, Michał Górny
Details | Diff
Small fix (git.eclass.diff,1.51 KB, patch)
2010-02-24 12:10 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-02-23 17:33:56 UTC
The current code for dealing with git bare repository cloning does doesn't play nice with shallow copies. Moreover, it lacks a '|| die' to the 'git clone' command.

I've created a simple proof-of-concept patch which allows git to deal fine with clones being both shallow and bare at the same time but I'm not sure whether it the correct approach.

It replaces the 'git clone' approach with rsyncing the bare copy into '.git' subdirectory of ${S}, and then uses 'git init' to reinit the repo (it is required for git to work with it) and 'git checkout' to get the required files.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-02-23 17:34:40 UTC
Created attachment 220867 [details, diff]
The patch to git.eclass
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-02-24 12:10:05 UTC
Created attachment 220963 [details, diff]
Small fix
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-06-04 07:51:05 UTC
Well, now I think shallow clones are useless after all. On first update, git fetches a lot of data after all -- and using them is really annoying. Thus, I think you might reject the bug.