-
-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git ignores global config gitexcludes/.git/config/ignore #295
The main culprit was the init `make([]string, len(env))` which added 3 zero entries to the slice which broke HOME/USERPROFILE for git status. Used USERPROFILE hack from segement-kube for windows in this case as well, as HOME is not set in gitbash/windows.
- Loading branch information
Showing
3 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package main | ||
|
||
import "runtime" | ||
|
||
func homeEnvName() string { | ||
env := "HOME" | ||
if runtime.GOOS == "windows" { | ||
env = "USERPROFILE" | ||
} | ||
return env | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters