jyknight / llvm-git-migration

7 stars 6 forks source link

Add repo import tool #6

Open greened opened 5 years ago

greened commented 5 years ago

Add a tool to take an existing git repository and rewrite its commits such that trees appear under a subdirectory in the monorepo. This is useful for downstream users to incorporate their own private repositories into the monorepo for various purposes.

danilaml commented 5 years ago

Is it different in purpose from https://github.com/jyknight/llvm-git-migration/blob/master/migrate-downstream-fork.py ?

EDIT: is it for other llvm-based repos that are not direct forks of existing llvm tools?

jyknight commented 5 years ago

I'm not sure I understand this tool. In its default mode, is it different than just doing a subtree merge of the other tool onto the tip of the monorepo?

greened commented 5 years ago

Yes, I suppose it really just is a subtree merge. Duh. It does rename tags but that's probably not enough to justify an entire tool.

greened commented 5 years ago

Ah, one aspect I had forgot about. This tool will import all branches of the repository. To do that with subtree merges would require a separate subtree merge of each branch. Maybe not incredibly painful, but a single one-shot tool to import everything might be useful.

greened commented 5 years ago

EDIT: is it for other llvm-based repos that are not direct forks of existing llvm tools?

Essentially, yes. It's for third-party projects that exist outside the official LLVM ecosystem. Really, anything at all one might want to import into a local fork of the monorepo for whatever reason.