git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ag, **, and the GPL
@ 2014-11-18  4:50 Matthew Kaniaris
  2014-11-18  6:20 ` Duy Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matthew Kaniaris @ 2014-11-18  4:50 UTC (permalink / raw)
  To: git

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?

-Matt Kaniaris

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ag, **, and the GPL
  2014-11-18  4:50 ag, **, and the GPL Matthew Kaniaris
@ 2014-11-18  6:20 ` Duy Nguyen
  2014-11-18 17:57 ` David Turner
  2014-11-18 19:09 ` Jonathan Nieder
  2 siblings, 0 replies; 7+ messages in thread
From: Duy Nguyen @ 2014-11-18  6:20 UTC (permalink / raw)
  To: Matthew Kaniaris; +Cc: Git Mailing List

On Tue, Nov 18, 2014 at 11:50 AM, Matthew Kaniaris <mkaniaris@gmail.com> wrote:
>  Would you grant me
> permission to reuse wildmatch.c (and necessary includes) for use in

wildmatch (in git) is originally from rsync. You need to ask them for
permission as well. I'm ok with relicensing my changes in
wildmatch.[ch] to Apache License Version 2.0.
-- 
Duy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ag, **, and the GPL
  2014-11-18  4:50 ag, **, and the GPL Matthew Kaniaris
  2014-11-18  6:20 ` Duy Nguyen
@ 2014-11-18 17:57 ` David Turner
  2014-11-19  0:48   ` Duy Nguyen
  2014-11-18 19:09 ` Jonathan Nieder
  2 siblings, 1 reply; 7+ messages in thread
From: David Turner @ 2014-11-18 17:57 UTC (permalink / raw)
  To: Matthew Kaniaris; +Cc: git

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). 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ag, **, and the GPL
  2014-11-18  4:50 ag, **, and the GPL Matthew Kaniaris
  2014-11-18  6:20 ` Duy Nguyen
  2014-11-18 17:57 ` David Turner
@ 2014-11-18 19:09 ` Jonathan Nieder
  2014-11-19  0:51   ` Duy Nguyen
  2 siblings, 1 reply; 7+ messages in thread
From: Jonathan Nieder @ 2014-11-18 19:09 UTC (permalink / raw)
  To: Matthew Kaniaris; +Cc: git, Nguyễn Thái Ngọc Duy

Hi,

Matthew Kaniaris wrote:

>                                                                   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?

wildmatch.c comes from rsync.

Conveniently, newer versions of rsync are under the GPLv3, which
according to [1] is compatible with the Apache license.  The code is
at lib/wildmatch.c from git://git.samba.org/rsync.git.  It hasn't
changed since the rsync license change.

Duy, what would you think of making git's wildmatch.c "GPL v2 or v3,
at your option"?

Thanks,
Jonathan

[1] http://www.gnu.org/licenses/quick-guide-gplv3.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ag, **, and the GPL
  2014-11-18 17:57 ` David Turner
@ 2014-11-19  0:48   ` Duy Nguyen
  2014-11-19  1:51     ` David Turner
  0 siblings, 1 reply; 7+ messages in thread
From: Duy Nguyen @ 2014-11-19  0:48 UTC (permalink / raw)
  To: David Turner; +Cc: Matthew Kaniaris, Git Mailing List

On Wed, Nov 19, 2014 at 12:57 AM, David Turner <dturner@twopensource.com> wrote:
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ag, **, and the GPL
  2014-11-18 19:09 ` Jonathan Nieder
@ 2014-11-19  0:51   ` Duy Nguyen
  0 siblings, 0 replies; 7+ messages in thread
From: Duy Nguyen @ 2014-11-19  0:51 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Matthew Kaniaris, Git Mailing List

On Wed, Nov 19, 2014 at 2:09 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Duy, what would you think of making git's wildmatch.c "GPL v2 or v3,
> at your option"?

wildmatch.c is not really owned by me (latest change is from Anthony
Ramine), but I would be ok with that.
-- 
Duy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ag, **, and the GPL
  2014-11-19  0:48   ` Duy Nguyen
@ 2014-11-19  1:51     ` David Turner
  0 siblings, 0 replies; 7+ messages in thread
From: David Turner @ 2014-11-19  1:51 UTC (permalink / raw)
  To: Duy Nguyen; +Cc: Matthew Kaniaris, Git Mailing List

On Wed, 2014-11-19 at 07:48 +0700, Duy Nguyen wrote:
> On Wed, Nov 19, 2014 at 12:57 AM, David Turner <dturner@twopensource.com> wrote:
> > 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.

I did sort of a massive pull request here:
https://github.com/ggreer/the_silver_searcher/pull/222 
Here's the main commit:
https://github.com/novalis/the_silver_searcher/commit/50d125647d7b91af08ad43b4b1b977b7e23e0cfa 

I think there as more discussion on some of the other tickets, but it
was over a year ago so I don't recall the details.

Really the thing that ag needs is (a) indexing and (b) to be hooked up
to watchman to update the index.  

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-19  1:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18  4:50 ag, **, and the GPL Matthew Kaniaris
2014-11-18  6:20 ` Duy Nguyen
2014-11-18 17:57 ` David Turner
2014-11-19  0:48   ` Duy Nguyen
2014-11-19  1:51     ` David Turner
2014-11-18 19:09 ` Jonathan Nieder
2014-11-19  0:51   ` Duy Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).