commit:     62d22ed69cecd3ae416b3b899062244865659d5b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  3 13:54:06 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Dec  3 13:54:06 2022 +0000
URL:        https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=62d22ed6

ebump: Use `git rev-parse --is-inside-work-tree`

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 bin/ebump | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebump b/bin/ebump
index 06264c4..25e9a7c 100755
--- a/bin/ebump
+++ b/bin/ebump
@@ -277,7 +277,7 @@ get_vcs() {
                return 0
        else
                if command -v git >/dev/null; then
-                       if [ -n "$(git rev-parse --git-dir 2>/dev/null)" ]; then
+                       if [ "$(git rev-parse --is-inside-work-tree)" = true ]; 
then
                                echo "git"
                                return 0
                        fi

Reply via email to