godu icon indicating copy to clipboard operation
godu copied to clipboard

Wild card matching in .goduignore

Open nochso opened this issue 8 years ago • 4 comments

Just thought I'd open an issue for what's mentioned in the readme. This should behave similar to .gitignore.

Perhaps have a look at gobwas/glob. It should allow matching directories and file names.

nochso avatar Jan 08 '17 20:01 nochso

Thanks @nochso, I think that when I was implementing godu I hugely underestimated the canonical filepath and its accessibility throughout the code. That's something that needs to be solved before this (and #14) can be implemented.

viktomas avatar Jan 08 '17 21:01 viktomas

I usually stick to path/filepath which has worked fine so far. Then again, I'm not entirely sure what you mean.

nochso avatar Jan 08 '17 23:01 nochso

godu is now prepared for the functionality to be implemented here: https://github.com/viktomas/godu/blob/master/core/file_walker.go#L43

It is free for taking if someone wants to implement the logic. Please thumb up this comment if you'd like to have more advanced .goduignore parsing and matching.

viktomas avatar Jan 17 '17 09:01 viktomas

The whole logic of .goduignore file is now stored in here https://github.com/viktomas/godu/blob/master/ignore.go#L37-L47 The wildcard matching could be implemented there.

viktomas avatar May 02 '20 20:05 viktomas