diff options
author | Jesse Luehrs <doy@tozt.net> | 2023-09-17 11:17:56 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2023-09-17 11:38:20 -0400 |
commit | 66939c71da756c1d9e07a88a4a8ea2a018650060 (patch) | |
tree | 38c0f516d561d1b23d3ebceb0a28f43e9d7e6464 /bin | |
parent | d72c1614d26e1a54c012bfeff8f5dbc327b9d2af (diff) | |
download | conf-66939c71da756c1d9e07a88a4a8ea2a018650060.tar.gz conf-66939c71da756c1d9e07a88a4a8ea2a018650060.zip |
add support for git-branchless
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/git/git-amend | 13 | ||||
-rwxr-xr-x | bin/git/git-record | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/bin/git/git-amend b/bin/git/git-amend new file mode 100755 index 0000000..3b937ec --- /dev/null +++ b/bin/git/git-amend @@ -0,0 +1,13 @@ +#!/bin/sh +set -eu + +if [ -e "$(git root)/.git/branchless" ]; then + exec git branchless amend "$@" +else + if [ "${1:-}" = "-i" ]; then + git add -p + else + git add -u + fi + git commit --amend +fi diff --git a/bin/git/git-record b/bin/git/git-record new file mode 100755 index 0000000..eaa36c9 --- /dev/null +++ b/bin/git/git-record @@ -0,0 +1,13 @@ +#!/bin/sh +set -eu + +if [ -e "$(git root)/.git/branchless" ]; then + exec git branchless record "$@" +else + if [ "${1:-}" = "-i" ]; then + git add -p + else + git add -u + fi + git commit +fi |