git: add git-st script
This commit is contained in:
parent
c2023b81ac
commit
3c12e2f746
2 changed files with 37 additions and 1 deletions
|
@ -39,7 +39,12 @@ sw = branchless switch
|
|||
s = branchless switch -i
|
||||
new = !git fetch -u origin main:main && git branchless switch -d origin/main
|
||||
|
||||
gerrit-clone = "!f() { git clone ssh://gerrit-ssh.shelman.io:2222/$1 && (cd $1 && mkdir -p `git rev-parse --git-dir`/hooks/ && scp -O -P 2222 gerrit-ssh.shelman.io:hooks/commit-msg `git rev-parse --git-dir`/hooks/commit-msg && chmod +x `git rev-parse --git-dir`/hooks/commit-msg && git branchless init); }; f"
|
||||
gerrit-clone = "!f() { \
|
||||
git clone ssh://gerrit-ssh.shelman.io:2222/$1 \
|
||||
&& (cd $1 && mkdir -p `git rev-parse --git-dir`/hooks/ \
|
||||
&& scp -O -P 2222 gerrit-ssh.shelman.io:hooks/commit-msg `git rev-parse --git-dir`/hooks/commit-msg \
|
||||
&& chmod +x `git rev-parse --git-dir`/hooks/commit-msg \
|
||||
&& git branchless init); }; f"
|
||||
|
||||
gerrit-switch = !(ssh `git remote get-url origin | cut -d / -f -3` gerrit query --format=JSON --current-patch-set status:open project:`git remote get-url origin | cut -d / -f 4-` \
|
||||
| jq -sr 'map(select(.number) | \"\\(.number) @ \\(.currentPatchSet.ref) - \\(.subject)\")|join(\"\\n\")' \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue