feat(sterni/git-only-push): isolate given commits and push to ref

Small git subcommand that enables you to push a subset of (independently
apply-able) commits from a local chain of commits to a remote ref, e.g.
for review. Useful for a workflow where you work on a chain of commits
and want to submit the ones that have been finished for review without
rebasing the chain.

Change-Id: I7717fe37867acdd826bc03a578104a0c3b2cbf71
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12900
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
sterni 2024-12-21 21:52:58 +01:00 committed by clbot
parent 7069de7857
commit 00f36f20e6
2 changed files with 136 additions and 0 deletions

View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
pkgs.runCommandNoCC "git-only-push"
{
nativeBuildInputs = [ pkgs.buildPackages.shellcheck ];
buildInputs = [ pkgs.bash ];
src = ./git-only-push.sh;
}
''
shellcheck "$src"
install -Dm755 "$src" "$out/bin/git-only-push"
''