opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

vendor_hw script: Help developers submit patches to vendored-in repositories

Open imphil opened this issue 7 years ago • 4 comments

With more code being vendored in, we need tooling to help developers work on the vendored-in code.

We need to either extend vendor_hw.py or write another tool, which:

  • Takes a diff of changes done to a vendored-in project
  • Creates a branch in the upstream project
  • Applies the patch to the upstream code
  • Optional: Opens a PR.

Ultimately, working on vendored-in code should require as little manual setup, mangling with different repositories, and understanding of git as possible. Optimize for the general case and make it as robust as possible, special cases can always handled manually.

imphil avatar Jul 22 '19 09:07 imphil

This probably also warrants another look at related work, before we evolve the feature set too much (it started as a simple script once ...)

Overview: https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Subprojects_or_sets_of_repositories

Possible options

  • git subtree
  • Braid: https://github.com/cristibalan/braid
    • PRO: Looks like what we need.
    • CON: Depends on Ruby

Not really suitable:

  • git submodules
    • Requires manual steps after cloning
  • Google Repo: https://source.android.com/setup/develop/repo
    • No modifications on top of clone

imphil avatar Jul 22 '19 09:07 imphil

On a mission to clean up old issues, scraping from stalest to freshest.

@imphil how does the thinking from Jul 22 jibe with today's thinking and with the modifications to vendor.py underweigh?

sjgitty avatar Dec 05 '19 02:12 sjgitty

That issue is still valid and would be a nice productivity improvement. But it's not high-prio right now.

imphil avatar Dec 07 '19 15:12 imphil

Closing this potential feature discussion. The existing vendoring script can probably be improved (or replaced), but this discussion is going to become less (rather than more) applicable over time.

rswarbrick avatar Jun 03 '25 08:06 rswarbrick