From 7bc56813eb2d43b7abe2a4c29b9b5a79d93e5077 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 3 Aug 2020 01:52:02 +0300 Subject: [PATCH] Feat: Check recursively for detached `HEAD` --- detached-head/check-detached-head | 2 ++ detached-head/check-detached-head-recursive | 4 ++++ detached-head/check-detached-head-repos | 7 +++++++ 3 files changed, 13 insertions(+) create mode 100755 detached-head/check-detached-head create mode 100755 detached-head/check-detached-head-recursive create mode 100755 detached-head/check-detached-head-repos diff --git a/detached-head/check-detached-head b/detached-head/check-detached-head new file mode 100755 index 0000000..22471c5 --- /dev/null +++ b/detached-head/check-detached-head @@ -0,0 +1,2 @@ +#! /bin/sh +git symbolic-ref -q HEAD >/dev/null || pwd diff --git a/detached-head/check-detached-head-recursive b/detached-head/check-detached-head-recursive new file mode 100755 index 0000000..e184e40 --- /dev/null +++ b/detached-head/check-detached-head-recursive @@ -0,0 +1,4 @@ +#! /bin/sh + +prog_dir="`dirname \"$0\"`" && +exec "$prog_dir"/../run-recursive "$prog_dir"/check-detached-head diff --git a/detached-head/check-detached-head-repos b/detached-head/check-detached-head-repos new file mode 100755 index 0000000..5590d73 --- /dev/null +++ b/detached-head/check-detached-head-repos @@ -0,0 +1,7 @@ +#! /bin/sh + +cd "`dirname \"$0\"`" && +prog_dir="`pwd`" && +export prog_dir + +exec "$prog_dir"/../run-repos "$prog_dir"/check-detached-head-recursive -- 2.39.5