From 41ebe0e0bfe39ee82b3fcd283081a2a8753fd7e3 Mon Sep 17 00:00:00 2001 From: Christophe Badoit Date: Fri, 6 Dec 2019 17:23:19 +0100 Subject: [PATCH] git-ignore: support non-default .git directory useful for submodules. Closes tj/git-extras#807 --- bin/git-ignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-ignore b/bin/git-ignore index c0e91fb..723550c 100755 --- a/bin/git-ignore +++ b/bin/git-ignore @@ -1,6 +1,6 @@ #!/usr/bin/env bash -: ${GIT_DIR:=.git} +: ${GIT_DIR:=$(git rev-parse --git-dir)} function show_contents { local file="${2/#~/$HOME}"