git-ignore: support non-default .git directory

useful for submodules.

Closes tj/git-extras#807
This commit is contained in:
Christophe Badoit 2019-12-06 17:23:19 +01:00
parent 29f6d0e0e0
commit 41ebe0e0bf

View file

@ -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}"