We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bba1f96 commit 256044cCopy full SHA for 256044c
bin/git-ignore
@@ -1,5 +1,7 @@
1
#!/usr/bin/env bash
2
3
+: ${GIT_DIR:=.git}
4
+
5
function show_contents {
6
local file="${2/#~/$HOME}"
7
if [ -f "$file" ]; then
@@ -37,13 +39,13 @@ function add_local {
37
39
38
40
function show_private {
41
cd "$(git root)"
- show_contents Private .git/info/exclude
42
+ show_contents Private "${GIT_DIR}/info/exclude"
43
}
44
45
function add_private {
46
- test -d .git/info || mkdir -p .git/info
- add_patterns .git/info/exclude "$@"
47
+ test -d "${GIT_DIR}/info" || mkdir -p "${GIT_DIR}/info"
48
+ add_patterns "${GIT_DIR}/info/exclude" "$@"
49
50
51
function add_patterns {
0 commit comments