summaryrefslogtreecommitdiff
path: root/Biz/Ide
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Ide')
-rwxr-xr-xBiz/Ide/hooks/post-applypatch.bash6
-rwxr-xr-xBiz/Ide/hooks/post-checkout.bash4
-rwxr-xr-xBiz/Ide/hooks/post-commit.bash6
-rwxr-xr-xBiz/Ide/hooks/post-merge.bash4
-rwxr-xr-xBiz/Ide/hooks/post-rewrite.bash6
-rwxr-xr-xBiz/Ide/hooks/pre-auto-gc.bash6
-rwxr-xr-xBiz/Ide/hooks/reference-transaction.bash12
7 files changed, 44 insertions, 0 deletions
diff --git a/Biz/Ide/hooks/post-applypatch.bash b/Biz/Ide/hooks/post-applypatch.bash
new file mode 100755
index 0000000..5071dc5
--- /dev/null
+++ b/Biz/Ide/hooks/post-applypatch.bash
@@ -0,0 +1,6 @@
+#!/bin/sh
+## START BRANCHLESS CONFIG
+
+git branchless hook post-applypatch "$@"
+
+## END BRANCHLESS CONFIG
diff --git a/Biz/Ide/hooks/post-checkout.bash b/Biz/Ide/hooks/post-checkout.bash
index 73488b0..982cb4b 100755
--- a/Biz/Ide/hooks/post-checkout.bash
+++ b/Biz/Ide/hooks/post-checkout.bash
@@ -13,3 +13,7 @@ then
$mktags $changed
fi
direnv reload
+## START BRANCHLESS CONFIG
+
+git branchless hook post-checkout "$@"
+## END BRANCHLESS CONFIG
diff --git a/Biz/Ide/hooks/post-commit.bash b/Biz/Ide/hooks/post-commit.bash
new file mode 100755
index 0000000..cd1f195
--- /dev/null
+++ b/Biz/Ide/hooks/post-commit.bash
@@ -0,0 +1,6 @@
+#!/bin/sh
+## START BRANCHLESS CONFIG
+
+git branchless hook post-commit "$@"
+
+## END BRANCHLESS CONFIG
diff --git a/Biz/Ide/hooks/post-merge.bash b/Biz/Ide/hooks/post-merge.bash
index c21211f..94f0f60 100755
--- a/Biz/Ide/hooks/post-merge.bash
+++ b/Biz/Ide/hooks/post-merge.bash
@@ -1,2 +1,6 @@
#!/usr/bin/env bash
exec ${CODEROOT:?}/Biz/Ide/hooks/post-checkout 'HEAD@{1}' HEAD
+## START BRANCHLESS CONFIG
+
+git branchless hook post-merge "$@"
+## END BRANCHLESS CONFIG
diff --git a/Biz/Ide/hooks/post-rewrite.bash b/Biz/Ide/hooks/post-rewrite.bash
new file mode 100755
index 0000000..8b3237a
--- /dev/null
+++ b/Biz/Ide/hooks/post-rewrite.bash
@@ -0,0 +1,6 @@
+#!/bin/sh
+## START BRANCHLESS CONFIG
+
+git branchless hook post-rewrite "$@"
+
+## END BRANCHLESS CONFIG
diff --git a/Biz/Ide/hooks/pre-auto-gc.bash b/Biz/Ide/hooks/pre-auto-gc.bash
new file mode 100755
index 0000000..c92a844
--- /dev/null
+++ b/Biz/Ide/hooks/pre-auto-gc.bash
@@ -0,0 +1,6 @@
+#!/bin/sh
+## START BRANCHLESS CONFIG
+
+git branchless hook pre-auto-gc "$@"
+
+## END BRANCHLESS CONFIG
diff --git a/Biz/Ide/hooks/reference-transaction.bash b/Biz/Ide/hooks/reference-transaction.bash
new file mode 100755
index 0000000..ea0cce6
--- /dev/null
+++ b/Biz/Ide/hooks/reference-transaction.bash
@@ -0,0 +1,12 @@
+#!/bin/sh
+## START BRANCHLESS CONFIG
+
+# Avoid canceling the reference transaction in the case that `branchless` fails
+# for whatever reason.
+git branchless hook reference-transaction "$@" || (
+echo 'branchless: Failed to process reference transaction!'
+echo 'branchless: Some events (e.g. branch updates) may have been lost.'
+echo 'branchless: This is a bug. Please report it.'
+)
+
+## END BRANCHLESS CONFIG