Re: ag, **, and the GPL
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Nov 19, 2014, 00:48 UTC
- Message-ID
- <CACsJy8BYBKMqWiNQ=xFjS8s_6GCeoA+UZ-HQ_V1qnsvQG6jOKA@mail.gmail.com>
- In-Reply-To
- <1416333456.27401.1.camel@leckie>
On Wed, Nov 19, 2014 at 12:57 AM, David Turner <dturner@twopensource.com> wrote:
Show 17 quoted lines
> On Mon, 2014-11-17 at 20:50 -0800, Matthew Kaniaris wrote: >> The Silver Search (https://github.com/ggreer/the_silver_searcher), is >> a small, open source, cross platform searching utility written as a >> replacement for ack. One of the major benefits of Ag (and a source >> for much of its speed) is that it obeys .gitignore. However, Ag >> currently treats gitignores as regexs which produces incorrect results >> for e.g. **. I'd like to add support to ag to obey the .gitignore >> spec but I'm not keen on implementing yet another fnmatch clone. Ag >> is licensed under the Apache License Version 2.0 which to the best of >> my understanding is incompatible with the GPLv2. Would you grant me >> permission to reuse wildmatch.c (and necessary includes) for use in >> Ag? > > I already implemented this without using any git code at > https://github.com/novalis/the_silver_searcher. The patch was rejected > because it slowed down ag slightly (or perhaps because it was overly > complex).
Interesting. Do you have a direct link to that discussion (I don't know how to navigate that novalis link). Generally you (or ag) should avoid fnmatch/wildmatch whenever possible. Hitting those *match() _will_ slow things down (and git tries hard to avoid it). I had some optimizations on top of rsync wildmatch to handle "*" case better, but I don't think it'll make big difference in practice.
-- Duy