From 66939c71da756c1d9e07a88a4a8ea2a018650060 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 17 Sep 2023 11:17:56 -0400 Subject: add support for git-branchless --- bin/git/git-amend | 13 +++++++++++++ bin/git/git-record | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 bin/git/git-amend create mode 100755 bin/git/git-record (limited to 'bin') 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 -- cgit v1.2.3-54-g00ecf