5 ms·
From the title I expected it to be a tool for treating multiple separate repos as though they were all just one single monorepo. But from the description in the
by codetrotter 5y ago
From the title I expected it to be a tool for treating multiple separate repos as though they were all just one single monorepo. But from the description in the README, it seems to be for treating subsets of a monorepo as though they were separate repositories.
PS: The title, in case it is changed, is currently “josh: Get the advantages of a monorepo with multirepo setups”
- oftenwrong 5y agoI apologise for the title. HN has a short limit for title length, so I came up with my own title. I thought this title did a decent job of presenting, using short language, the main application that the authors gave top-billing in the README. I am not affiliated with the project. JOSH claims to be reversible, so it could be used in either direction, which is where the multiple use cases come in. Treating subsets of a repo as their own repo, or treating multiple repos as one. I would say there is some application overlap between this and git submodule/subtree/subrepo and also tools like copybara.
- tusharsadhwani 5y agoYou might want to check out https://github.com/asottile/all-repos https://github.com/asottile/all-repos :)
- lbhdc 5y agoThat was what I expected from the description as well. After reading the readme it's not clear to me what problem this is trying to solve, and why this is the solution.
- ganafagol 5y agoThe problem is that large codebases tend to have a huge footprint if you need to clone the whole repo. Git as-is does not allow you to only pull a subset, i.e. specific paths representing a sub project. That's what josh is trying to solve: a "virtual" repo that behaves like a real git repo but behind the scenes seemlessly integrates with the big monorepo.
- mumblemumble 5y agoWhereas what I was kind of hoping for was something that works like svn externals. (No, git submodules are not it.)
- lbhdc 5y agoI believe git provides that functionality through sparse-checkout. You can clone a repository without checking it out, then use sparse-checkout to only pull the paths you want.
- rcxdude 5y agosparse-checkout only reduces the number of files copied from the local repo to the working directory. It doesn't affect the amount downloaded data. For that you need shallow and partial clones (shallow clones give you a subset of history, partial clones give you a subset of the files within that history). Partial clones especially are a relatively new and not heavily used git feature.
- varajelle 5y agoPartial clone with the --filter feature seems complicated to use. You need to use a bunch of command to set it up and then it looks like you still need to be careful while using it. I'd dream of somethong as simple as git clone --partial foo/bar https://example.com/some.repo.git And then everything would work normally.
- chrschilling 5y agoYour dream came true ;) This is what Josh does: git clone https://example.com/some.repo.git:/foo/bar.git And then everything works normally.
- Jenk 5y agodisclaimer: I haven't seen for myself what benefits monorepos actually provide so I don't fully grok them. This is the kind of talk about monorepos that makes me think they are a bad idea. Why would someone want to maintain a monorepo and then pretend it's not a monorepo? Not only just pretend it isn't, but invest not-insignificant time on the problem of pretending it's not a monorepo? I am immediately thinking of the horribleness of how some of the (older) javascript frameworks re-invented the back button (and browser history in general) instead of.. ya know, using the browser.
- geitir 5y agoGoogle's tool repo kind of does what you thought this does
- icythere 5y agoIs that for android build system only? West is a better one I think https://github.com/zephyrproject-rtos/west#basic-usage https://github.com/zephyrproject-rtos/west#basic-usage
- karlding 5y agoNo, repo is not tied to AOSP or the Android build system. As an example, Chromium [0] is a non-AOSP project that also uses repo. [0] https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_guide.md#Get-the-source-code https://chromium.googlesource.com/chromiumos/docs/+/HEAD/dev...