Copyright

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Copyright

Post by bejant »

I created a new topic for this so as to not hijack the Ellipse topic in the Development section of the forum. Anyway, I read the following in that thread and didn't understand it very much:
marktaff wrote:I also have concerns about how my copyright would be respected, since I don't actually have write access to master.
Would you elaborate on this?
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Copyright

Post by ulrich1a »

If somebody writes code for an open source project, he has the copyright for what he wrote. So I would expect for example, that the name of the author shows up in git in the list of contributors. There could also be a remark in the code, that this routine is copyright of ...
Open source project typically respects the copyright.
The question is, under what license the author allows to use his code. This is a totally different thing.

Ulrich
User avatar
marktaff
Posts: 47
Joined: Sun Sep 21, 2014 3:25 pm
Location: Seattle, Washington, USA

Re: Copyright

Post by marktaff »

bejant wrote:I created a new topic for this so as to not hijack the Ellipse topic in the Development section of the forum. Anyway, I read the following in that thread and didn't understand it very much:
marktaff wrote:I also have concerns about how my copyright would be respected, since I don't actually have write access to master.
Would you elaborate on this?
Sure, no problem. :-)

To be clear, I am not accusing anyone of anything untoward. Nor is it about licensing, as I usually only write GPL or LGPL code (I did once do some BSD code, in keeping with the original developer's intentions).

Traditionally, when you add a new file/class, your copyright goes at the top of the file. And when you add substantial code or a new class to an existing file, your copyright gets appended to the existing copyright, like so:

Code: Select all

/***************************************************************************
 *   Copyright (c) 2010 Jürgen Riegel (juergen.riegel@web.de)              *
 *   Copyright (c) 2014 John Smith (j.smith@example.com)                   *
/*
In addition, when you make a commit to HEAD, the repo keeps track of the changes, and so the exact code that you have copyright over is tagged with the author's credentials and a diff is available. If someone else commits my code to master, because I don't actually have write permissions, then it seems like the information about which code my copyright applies to is lost, if not recognition of the copyright entirely.

Similar concerns arise with multiple developers on a branch. Dev A writes some code on their custom branch. Dev B writes related code on their own branch that complements/extends A's code. Dev A then grabs B's code and puts it in their branch (by consent, of course). Ultimately, Dev C commits Dev A's branch to master. How does the project maintain exactly what code Dev B holds copyright to?

I hope that clarifies my concerns. :-)
Available on chat.freenode.net#freecad while working on FreeCad
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: Copyright

Post by tanderson69 »

marktaff wrote:If someone else commits my code to master, because I don't actually have write permissions, then it seems like the information about which code my copyright applies to is lost, if not recognition of the copyright entirely.
No, not in a normal workflow. And even in a non-normal workflow, git has tools to keep the author and changes straight. Do "git log master" and you will see plenty of author names from people without write permissions.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Copyright

Post by jmaustpc »

marktaff wrote:In addition, when you make a commit to HEAD, the repo keeps track of the changes, and so the exact code that you have copyright over is tagged with the author's credentials and a diff is available. If someone else commits my code to master, because I don't actually have write permissions, then it seems like the information about which code my copyright applies to is lost, if not recognition of the copyright entirely.

Similar concerns arise with multiple developers on a branch. Dev A writes some code on their custom branch. Dev B writes related code on their own branch that complements/extends A's code. Dev A then grabs B's code and puts it in their branch (by consent, of course). Ultimately, Dev C commits Dev A's branch to master. How does the project maintain exactly what code Dev B holds copyright to?
Its not impossible for there to be an issue but you really need to go read how git works....it knows who made a commit, it doesn't matter who then pushes it into the "official" master on the sourceforge server. If you simply pull someone's branch their commits appear in the branch you pulled into under their name, not the name of the person (you) who only "pulled" it. Git is a decentralised version control system, it is not necessary to have commit rights to the "official" master branch.

You should create a new branch with the code changes relating to one pull request. You should squash your many commits and rebase this branch on the then current master.

You should always keep your local "master" branch in synchronised with official 'master' and develop in new branches and its even worth have more than one local repository.

Tanderson69 found and put us onto this link sometime ago
https://wildlyinaccurate.com/a-hackers-guide-to-git

I found all these and posted them back when we first moved to Git see here
viewtopic.php?f=10&t=2021#p14181


Jim
User avatar
marktaff
Posts: 47
Joined: Sun Sep 21, 2014 3:25 pm
Location: Seattle, Washington, USA

Re: Copyright

Post by marktaff »

Thanks for the clarifying info, guys. I'll dig into that info after work.
Available on chat.freenode.net#freecad while working on FreeCad
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Copyright

Post by shoogen »

There are ways to screw up (reset) the authorship information. Squashing commits from multiple authors is work. Sometimes attributing trivial changes to a wrong author helps to reduce the number of commits needed. WandererFan and I had the same problem with the Draft/BezierCurve.
You usually start of with a complex git branch with exact authorship information and try to reduce the number of commits.
If somebody moves large portions of other peoples code, this is a bit problematic. Commits might have to be split and authorship information modified. But there are a lot of people around the forum that can help manipulating the git history.
You just need to work on development branches and to find some consent among all the authors before making the final pull request.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Copyright

Post by abdullah »

I would not want to repeat what has already been said.

Just to be clear, licensing in FreeCAD, if you want your code to go to master has to be LPGL 2+. Am I happy with that? My natural choice would be GPLv3, but then there would be tons of problems with dependencies, among others. I implicitly accept that anything I have commited is under the license of the header of the file.

I am not sure how copyright works. But if you add code to a file that has a copyright header, I think you are implicitly accepting that licensing (since your code does not explicitly have a license copyright).

I understand that your concern regarding copyright law is "attribution". I would not mind at all adding names to the header of the file. However, then we have to start thinking of what is "substantial" (1 line, 3 lines, 1 bugfix, 50 bugfixes, a new straightforward functionality, a whole workbench ...). I think this is way too complicated (unless there is a good reason to do it so, for example a legal reason, which I ignore).

Is it possible that your authoring information will be lost during a pull request? Yes, it is possible. But generally it is not the case (Sebastian gives you a good example).

In fact, I invite you to look at this screenshot of your branch, where you can see that this file was contributed by several people, DevJohan, JRiegel and Me:
ellipse47.png
ellipse47.png (92.89 KiB) Viewed 2477 times
Nothing is 100% guaranteed. I aim by no means to take ownership over anybody else's work. What is true, as Sebastian suggests, is that providing a proper pull request, is the way to help the integrator, so that he does not have to invest 6 hours in just maintaining authoring information.

Coming back to the originating topic, the ellipse code. I have to do a major clean up when it is ready. The development has been chaotic, mostly because we have developed it by continuously hitting against walls, due to my lack of knowledge of the internals. I will do an earnest effort to maintain authoring in my branch, but a lot of things have to be squashed because there is no point to accumulate unuseful commits (basically the hittings against walls, the changes of direction in the internals). My intention is at the end to reduce the whole to at most 3-4 commits (but I will consult Sebastian when the time comes...).

So, what is doable and compatible?
1. I put my branch in a clean status, receive your commit and then go to master,
2. I commit the work of my branch to master (with author information from, e.g. DeepSOIC), and then you add, in one or several commits, your improvements to master (if you wish to).

I am really cool about this...
User avatar
tanderson69
Veteran
Posts: 1626
Joined: Thu Feb 18, 2010 1:07 am

Re: Copyright

Post by tanderson69 »

abdullah wrote:I will do an earnest effort to maintain authoring in my branch, but a lot of things have to be squashed because there is no point to accumulate unuseful commits (basically the hittings against walls, the changes of direction in the internals). My intention is at the end to reduce the whole to at most 3-4 commits (but I will consult Sebastian when the time comes...)
:D You are gitting it!
Post Reply