threads / discuss / 21142

Code reuse

Subject: Code reuse

## tl;dr

4 messages between Oct 6, 2009 and Oct 7, 2009.

replies: 3people: 3as markdown or json

Philip Herron· Oct 6, 2009, 19:18 UTC · lore
Hey guys

I am not sure if this is the right place to ask this question, but I've been working on a personal project a programming language interpreter for some time now, but i took 2 code snippets from git-core namely:

static struct hash_table_entry *lookup_hash_entry(unsigned int hash, const struct hash_table *table)

function from hash.c and the alloc_nr.

I've changed it a good bit (probably doesn't resemble much of what it was) to fit in with the way my stuff works but is there anything i need to like put in my source code to say hey this is based of git-core, so far is just a comment to say 'based of git-core hash.c'. Its an open source (GPL) program but i haven't released or made much noise about it yet because i want to work on it more myself.

Anyways thanks,
--Phil
Sitaram Chamarty· Oct 7, 2009, 12:30 UTC · re: Philip Herron · lore

Re: Code reuse

On Wed, Oct 7, 2009 at 12:48 AM, Philip Herron <herron.philip@googlemail.com> wrote:

> I am not sure if this is the right place to ask this question, but
> I've been working on a personal project a programming language
> interpreter for some time now, but i took 2 code snippets from
> git-core namely:
[snip]
Show 6 quoted lines
> I've changed it a good bit (probably doesn't resemble much of what it
> was) to fit in with the way my stuff works but is there anything i
> need to like put in my source code to say hey this is based of
> git-core, so far is just a comment to say 'based of git-core hash.c'.
> Its an open source (GPL) program but i haven't released or made much
> noise about it yet because i want to work on it more myself.

In general, the GPL's main requirement is that whoever gets the binary should also get the code (I'm over simplifying but that's basically it). It actually doesn't say much about giving credit, except (from <HEAD:COPYING>):

"If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations"

and

"a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change."

That's basically it...

It would seem to me that, if you changed them significantly, and going by the above logic, you don't need to do *anything* regarding attribution.

Philip Herron· Oct 7, 2009, 20:12 UTC · re: Sitaram Chamarty · lore

Re: Code reuse

Thanks for that i am no legalese speaker so yeah ;). Its only really the alloc_nr but its renamed is nearly the same the other really isnt the same only just 2 statements with different identifiers remain.

Thanks anyways git-core is nice :)
--Phil
2009/10/7 Sitaram Chamarty <sitaramc@gmail.com>:
Show 42 quoted lines
> On Wed, Oct 7, 2009 at 12:48 AM, Philip Herron
> <herron.philip@googlemail.com> wrote:
>
>> I am not sure if this is the right place to ask this question, but
>> I've been working on a personal project a programming language
>> interpreter for some time now, but i took 2 code snippets from
>> git-core namely:
>
> [snip]
>
>> I've changed it a good bit (probably doesn't resemble much of what it
>> was) to fit in with the way my stuff works but is there anything i
>> need to like put in my source code to say hey this is based of
>> git-core, so far is just a comment to say 'based of git-core hash.c'.
>> Its an open source (GPL) program but i haven't released or made much
>> noise about it yet because i want to work on it more myself.
>
> In general, the GPL's main requirement is that whoever gets the binary
> should also get the code (I'm over simplifying but that's basically
> it).  It actually doesn't say much about giving credit, except (from
> <HEAD:COPYING>):
>
> "If the software is modified by someone else and passed on, we want
> its recipients to know that what they have is not the original, so
> that any problems introduced by others will not reflect on the
> original authors' reputations"
>
> and
>
> "a) You must cause the modified files to carry prominent notices
> stating that you changed the files and the date of any change."
>
> That's basically it...
>
> It would seem to me that, if you changed them significantly, and going
> by the above logic, you don't need to do *anything* regarding
> attribution.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Florian Weimer· Oct 7, 2009, 20:15 UTC · re: Sitaram Chamarty · lore

Re: Code reuse

* Sitaram Chamarty:
> It would seem to me that, if you changed them significantly, and going
> by the above logic, you don't need to do *anything* regarding
> attribution.

Note that applicable laws may impose additional restrictions, like crediting authors in the way they require.

My personal approach is to include the copyright header of the file I'm quoting from, together with a comment which explains where the code came from (project, version, path).

← back to recent threads