git-subrepo icon indicating copy to clipboard operation
git-subrepo copied to clipboard

git subrepo branch --remote %parent_repo% --fetch --force

Open elmpp opened this issue 5 years ago • 3 comments
trafficstars

Thanks for this library - it's really helped me see into git machinations that have always scared me

I've a subrepo A. A is a fork of B. All pulls/pushes will be to A (and then synced by other processes A->B/B->A) so the meta file remains pointed to A (following initial subrepo clone)

However, for my project, i'm looking to compute the commit diffs from the subrepo with respect to B. Currently, i can very easily run git subrepo branch %package_path% --fetch --force and find the commit diffs using the ref subrepo/%package_path%/fetch against the branch head ref but this is for repo A obviously

I am wondering if there is any way to recreating the result of a --remote option on branch (or otherwise). This is the only repo B operation so am hoping to achieve my goal using command options rather that affecting the meta file

elmpp avatar Oct 21 '20 20:10 elmpp

friendly ping @admorgan @grimmySwe

elmpp avatar Oct 24 '20 07:10 elmpp

I'm wondering what's the best way to proceed here.

I could probably hack something together but it having a branch --remote maybe could be useful for other scenarios 🤷

elmpp avatar Nov 06 '20 19:11 elmpp

I am going to have to admit that I am having trouble visualizing what is going on here. subrepo fetch already supports a -b and -r option. It does not update your .gitrepo and does everything that you have requested as far as I can tell.

admorgan avatar Nov 14 '20 17:11 admorgan