I maintain an open-source project. Somebody made a pull-request two days ago, and I accepted it. Now I realized, that a large portion of the pull-request is just a copy-pasted from another project (not owned by us). For obvious reasons I want to get rid of the commit. The two options I see are:

  1. Revert the commit with another commit. Problem: the code is still in the history.
  2. Rewrite the history. Dangerous, as other people might already have branches containing this commit. In fact I know one person beside me who already has (but is he the only one?)

Note: my case is a little bit special, and I think I just choose the first option. The original author doesn't have a very clear licence, and even allows to use parts of the content as long as we don't claim ownership. However I still find it very unethical to just copy every single word (as it is 95% text and 5% code).

But let's assume we have a more difficult case, and the licence of the source project explicitely doesn't allow copying/modifying their code.

  • What are the legal consequences? I know that we already messed up big, and I guess that the other project can still claim that we used parts of their code in either option.

  • Is option 1 even a good way to proceed? This might be a cause other problems, as anybody can look up the code in the history, and think they can use it as long as it complies with our licence.

  • As option 2 is also quite bad, are there other options?

  • 6
    The problem is that if you leave it in the VCS history you are still distributing it. Especially with a dvcs like git every time someone "clones" your repo they are downloading the whole history, not merely the current version. – Peter Green Oct 22 at 19:05
  • 2
    plagiarism ≠ copyright infringement: plagiarism is when you get someone else to do your school/collage work, and do not put in proper citation (you are telling the grader that you did it). Copyright infringement is using someone else's work without their permission. – ctrl-alt-delor Nov 3 at 19:33
up vote 15 down vote accepted

You should rewrite the commits/history ommiting the legally dubious one.

Sure its going to muck up other peoples forks/branches but not irretreivably and its not the sort of thing you want to bite you in the arse after your project has become the new facebook.

Do it as soon as possible.

  • You can only use option 1 if you have the right to duplicate and distribute the code. If you don't, every time someone copied or distributed your history, they'd be violating copyright. (There are some exceptions that you could argue might apply, but you really don't want to force all your developers down that road.) – David Schwartz Nov 10 at 0:10

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.