Ignores _sgbak folders by default #31

wants to merge 2 commits into


None yet

2 participants


_sgbak folders hold the old versions in SourceGear's Vault directory. Ignoring it is the default behavior in ack. This is a pretty quick and dirty patch, and it seems like this will eventually go in the "huge-ass list of files we want to ignore by default". I dunno if you really want this, but I needed it and figured I'd throw it out there.


Whoops, left in a printf. One sec.


First, thanks for submitting this pull request. I like it when people err on the side of contributing code rather than hoarding it.

That said, I don't want to merge it, for several reasons. I do need to make some better defaults for ignoring files, but I don't think hard-coded strcmp()s are the way to go. Also, your patch will ignore _sgbak even if ag is run with -u for unrestricted searches.

I don't know if you already know this, but if you want to ignore files you can put patterns in a .agignore file. It works just like git's .gitignore and Mercurial's .hgignore.

@ggreer ggreer closed this Apr 21, 2012

No problem. Thanks for the feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment