Feature request: clone/fetch bare git repositories in a separate directory
Feature request
With the Plasma 5/6 and KF 5/6 transition ongoing, it is often needed to work on both versions simultaneously (cherry-pick, fix bugs specific on 5.27, test something etc). There are some solutions available, such as:
- clone once, switch branches on every rebuild.
-
✅ Pros: space efficient -
❌ Cons: both CAN'T be available at the same time, takes time to checkout branches, might run into build failures or random build-dir migrations (#117 (closed))
-
- just clone 2 times. By having kdesrc-buildrc point to different sets of source/build/install directories, you basically have two isolated environments which have nothing to do with each other.
-
✅ Pros: both are available at the same time. -
❌ Cons: space inefficient, slow (double fetch to update), boring to manage, hard to sync branches (can be aided by adding each other as file:// "remotes" in git config).
-
- clone one set of sources normally, set up second one as git worktrees.
-
✅ Pros: both are available at the same time; space efficient, fast, branches are in sync. -
❌ Cons: boring to manage, no built-in support: you'd need to repeat it for any newly cloned repo in future; somehow one set of source becomes "source of truth", and if you remove one repo here the other one would become "orphan" there.
-
However, what if kdesrc-build could set it all up for us, in a space-efficient, automatic manner without homebrew bash scripts?
With a new option like bare-git-dir
it would manage git repos separately from working directories with checked out source code. It would be shared between Plasma 5, Plasma 6, KF5, KF6 and any other temporary worktrees if feel like you need some. All branches would be automatically available in all worktrees, no boring synchronization needed.