Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Take into account global gitignore files #18

Open
mightybyte opened this issue Mar 24, 2019 · 4 comments
Open

Take into account global gitignore files #18

mightybyte opened this issue Mar 24, 2019 · 4 comments

Comments

@mightybyte
Copy link
Contributor

Git allows ignore files to be specified outside the project directory in places such as $XDG_CONFIG_HOME/git/ignore, ~/.gitconfig, etc. It would be really nice if this package could take those files into account.

@siers
Copy link
Owner

siers commented Mar 25, 2019

I thought about that when making files readable instead of accepting just a gitignore list, since then you can do [~/.gitignore ((getEnv "XDG_CONFIG_HOME") ++ "git/ignore")].

It could be more automatic though, sure.

@mightybyte
Copy link
Contributor Author

That works for $XDG_CONFIG_HOME/git/ignore, but it doesn't work for ~/.gitconfig. I think that one is complicated enough that it requires built-in support.

@roberth
Copy link
Contributor

roberth commented Apr 2, 2019

It's a line based format, so it seems you can find all you need with some string and list processing on lib.strings.splitString "\n" (builtins.readFile ~/.gitconfig). What do you think is missing?

It will jump around the filesystem to find include.path includes and the core.excludesfile file/files, but that should not be much of a problem as long as you don't rely on derivations.

@roberth
Copy link
Contributor

roberth commented Apr 22, 2019

No built-in support was need when doing preparation for this feature in #20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants