Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455048 - git-2.eclass: Add support for submodules in non-bare clones
Summary: git-2.eclass: Add support for submodules in non-bare clones
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: No maintainer - Look at if you want to take care of it
Keywords: PATCH
Depends on:
Reported: 2013-02-01 20:36 UTC by Hristo Venev
Modified: 2016-08-06 08:27 UTC (History)
1 user (show)

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

Support for submodules in bare repositories (bare-submodules.patch,5.94 KB, patch)
2013-02-01 20:37 UTC, Hristo Venev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hristo Venev 2013-02-01 20:36:09 UTC
In git-2.eclass EGIT_HAS_SUBMODULES requires a nonbare clone. I'll attach a patch to support submodules in bare clones.

Another bug: When a force-update is required, in a nonbare clone git will attempt to merge the commits. This is not a good idea.

Reproducible: Always
Comment 1 Hristo Venev 2013-02-01 20:37:03 UTC
Created attachment 337628 [details, diff]
Support for submodules in bare repositories

Tested with bare repositories and works. Not tested with nonbare repositories.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-02 21:35:22 UTC
That's a lot of code with no comments. I'd appreciate if you could elaborate on it a bit more. Especially, how does it work with network activity? Is it possible to use the repo with submodules with EVCS_OFFLINE=1 and no network access?

I was going to work on something like this for a long time but never got the time to do it. However, my solution was more like hand-fetching all the submodules into separate bare clones.

Also, I see you're using --git-dir a lot there. If it's everywhere, could you instead use 'local GIT_DIR=...' in the src_unpack() func, plus 'export GIT_DIR'?
Comment 3 Pacho Ramos gentoo-dev 2016-08-06 08:27:15 UTC
Use git-r3.eclass instead