From: David Kastrup <dak@gnu.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH 0/2] Two janitorial patches for builtin/blame.c
Date: Tue, 21 Jan 2014 23:56:37 +0100 [thread overview]
Message-ID: <87iotdosey.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <xmqqa9epulwq.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Tue, 21 Jan 2014 12:20:37 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>> David Kastrup wrote:
>>
>>> So my understanding is that when we are talking about _significant_
>>> additions to builtin/blame.c (the current patches don't qualify as such
>>> really) that
>>>
>>> a) builtin/blame.c is licensed under GPLv2
>>> b) significant contributions to it will not be relicensed under
>>> different licenses without the respective contributors' explicit
>>> consent.
>>
>> Yep, that's how it works.
>>
>> [...]
>>> The combination of the SubmittingPatches text with the file notices in
>>> builtin/blame.c is not really painting a full picture of the situation.
>>
>> Any idea how this could be made more clear? E.g., maybe we should
>> bite the bullet and add a line to all source files that don't already
>> state a license:
>>
>> /*
>> * License: GPLv2. See COPYING for details.
>> */
>
> I vaguely recall that jgit folks at one point wanted to lift this
> implementation and were interested in seeing it to be dual licensed
> to BSD but that was a long time ago.
>
> http://git.661346.n2.nabble.com/JGIT-Blame-functionality-for-jgit-td2142726.html
Ok, let me state quite clearly before we waste time, energy and
goodwill:
a) I am reworking the core logic of blame.c to make it produce the same
results while being orders of magnitude faster. Git's current
implementation is a roadblock for serious use. Keeping its current core
algorithms and data flow, it would have been reasonably easy to speed
the current code up by a factor of 2 or more by doing local
optimizations. But I've chosen _not_ to keep the current logic and data
flow. That means quite a bit more work, and it means completely
understanding the existing code before being able to replace it.
The core part of blame.c spends literally billions of iterations in
real-life situations leafing through one large linear list for tiny bits
of information. One could use a better searchable data structure and
speed up the access in that manner, but better than a fast search is no
search at all. I am separating the data so that at any given time I am
only accessing actually relevant data. O(n) beats O(n lg n), and the
code remains almost as readable as the current O(n^2).
b) This will require thoroughly reworking the core parts of the
algorithm which will then be about 50/50 old and new code that cannot
sensibly be separated since significant parts of the previous code will
be gone completely as the data flow is fundamentally different.
c) The "fine points" of blame.c, in particular all the various command
line options and the implementation of their exact meaning would stay
the same. I hope I can avoid touching more than 50% of the code.
d) I am fine with distributing my work under the GPLv2 or later, but no
other license will be implied. While this does not affect the core Git
distribution itself: for distribution under more permissive licenses for
the purpose of making inclusion in proprietary software possible, I'd
probably attach a big price tag that reflects the amount of work and
quality of code going in and the fact that I have no other source of
income.
e) No idea whether this would affect JGIT: it depends on how much JGIT
would be a literal translation of blame.c into Java (?) or a
functionally equivalent rewrite employing different and/or native data
structures to achieve the same effect. To me it's irritating that
something like the fine but boring points of option parsing might be
more susceptible to copyright protection than doing a careful
algorithmic design, but that's the way the world is wired.
At any rate: JGIT or not, I'll be contributing work with the
understanding that it will be licensed under the _current_ licensing
scheme of Git. And I think that's a reasonable expectation.
--
David Kastrup
next prev parent reply other threads:[~2014-01-21 22:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-19 18:57 [PATCH 0/2] Two janitorial patches for builtin/blame.c David Kastrup
2014-01-19 18:57 ` [PATCH 1/2] builtin/blame.c: struct blame_entry does not need a prev link David Kastrup
2014-01-21 21:54 ` Junio C Hamano
2014-01-21 23:02 ` David Kastrup
2014-01-19 18:57 ` [PATCH 2/2] Eliminate same_suspect function in builtin/blame.c David Kastrup
2014-01-21 16:22 ` [PATCH 0/2] Two janitorial patches for builtin/blame.c David Kastrup
2014-01-21 16:55 ` Jonathan Nieder
2014-01-21 17:40 ` David Kastrup
2014-01-21 17:44 ` Jonathan Nieder
2014-01-21 17:58 ` David Kastrup
2014-01-21 19:15 ` Jonathan Nieder
2014-01-21 19:56 ` David Kastrup
2014-01-21 20:01 ` Jonathan Nieder
2014-01-21 21:30 ` David Kastrup
2014-01-21 20:20 ` Junio C Hamano
2014-01-21 22:56 ` David Kastrup [this message]
2014-01-21 19:53 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iotdosey.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).