From 5744b78be0d7ff168dcaf777c2f98818aab3862f Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 23 Feb 2024 00:04:34 -0500 Subject: git helpers should be installed with git, not with the other bin files --- git/.bin/git/git-root | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 git/.bin/git/git-root (limited to 'git/.bin/git/git-root') diff --git a/git/.bin/git/git-root b/git/.bin/git/git-root new file mode 100755 index 0000000..96fb395 --- /dev/null +++ b/git/.bin/git/git-root @@ -0,0 +1,9 @@ +#!/bin/sh +set -eu + +root="$(git rev-parse --show-superproject-working-tree 2>/dev/null)" +if [ -n "$root" ]; then + echo "$root" +else + git rev-parse --show-toplevel +fi -- cgit v1.2.3-54-g00ecf