Skip to content

Rewrite checkout-branch-worktree, rename to gst-worktree.py, and allow removing

Nirbheek Chauhan requested to merge nirbheek/gst-build:worktree-rewrite into master

commit a950c286:

git-worktree: Parse wrap files instead of meson introspect

meson introspect is the wrong approach since it:

* Requires a pre-existing build directory for the current branch
* Gives us potentially incorrect information since it tells us
  subproject details for the current branch, not the branch we're
  checking out.
* Does not allow us to share the git repos for non-gst repos since it
  can't tell us the git branches for them.

Instead, parse the wrap files in the branch we're checking out since
they're just INI-style config files.

commit 2138bce2:

git-worktree: Allow multiple worktrees for subproject branches

It's pretty common to have the same branch for a subproject in
multiple worktrees. F.ex., when you want to test a feature branch
common to a few gstreamer subprojects but not the rest.

commit dd065f67:

git-worktree: Fix indentation

commit 85e81894:

.gitignore: Ignore subproject package cache

commit 7ff177bd:

Move checkout-branch-worktree to gst-worktree.py

We will add more actions to it than just 'checkout'. Also add
a wrapper shell script that calls gst-worktree.py with the correct
arguments.

commit 8ee97a3f:

gst-worktree: Add sub-commands: add and rm

`add` behaves the same as before. `rm` removes worktrees.

`git worktree remove` on the gst-build worktree will delete the
subproject worktrees inside it, but will not remove the references to
them in the main repository's subproject worktrees. The `rm` command
will.
Edited by Nirbheek Chauhan

Merge request reports