I've patched a bug in some code that is no longer being supported by it's owner but I would like to provide this to other members of the community.

A git.patch file technically contains copyright source code (in order to show what is removed/changed), does this make it illegal if I don't have permission from the owner?

Would this be considered "fair use"?

  • 1
    It depends on the license. I don't think anyone here can answer this question.
    – RubberDuck
    May 8 '15 at 10:03
  • I suppose the question boils down to whether the licence/copyright is valid for the purposes of a patch file. The copyright code is only referred to as a reference. No code is explicitly changed in the patch file, it just details how to change it. May 8 '15 at 10:29

This is a very hard question, and only a specialised lawyer will be able to give you an answer. I will just address the technical aspect of your question.

Technical solution of your problem

The easiest technical solution to your problem is to use another patch format. The patch and diff utilities support several formats, and an especially interesting one for you is the format generated by diff -e:

   -e  --ed
          Output an ed script.

An ed script is a small programm deleting lines in a file and inserting some other lines, much like what the nowadays usual unified patch format describes. However unlike the latter, ed scripts do not contain contextual information. Technically the ed script contains only your work, so you may see it as an adequate way to distribute your patches. It seems that git-diff does not support the production of patches as ed scripts, so you will need to manually produce them, the easiest way to do so is probably to diff two directories containing the original and the modified version of the source code.

As a side note, I am asking why not bring the original code owner in the discussion? Has the original code owner any good reasons to refuse you to distribute patches? There is chances that you can reach an agreement on how to distribute patches on this code, as it seems to me that you add value to the existing software at no cost for the product owner and without eating their bread.

  • This assumes that nothing prevents you a priori to distribute patches, like the licence agreements explicitly forbidding this for instance. May 8 '15 at 11:21
  • the unsupported code has been replaced with a entirely new product that serves the same function, so the original code owner has virtually no motivation to be helpful with this issue, in fact their motivation is in the other direction. You are correct though, I have already contacted the owner to ask whether they would consider git patches to violate their license. I'm hoping for the best ofc. May 8 '15 at 12:24
  • 2
    thanks for the technical solution, it definitely gives me something to work with. May 8 '15 at 12:26

This is not going to be something that can easily be answered. Typically, I would recommend "staying clear" of the issue (don't publicly distribute the patch).

You have (as far as I can tell) two real questions that need answering. First, are the little snippits of code in a diff in violation of copyright laws if publicly distributed. I would tend to lean towards "no" as long as the code isn't giving away any core functionality. For example if diff shows entire classes and functions then it probably would cause a problem. If it shows a line or two here and there then it probably isn't a problem.

The second question is do you have the rite to modify and distribute those modifications. The answer to that is usually "no way". Closed source usually means exactly that. Only a "select" group of people have the rite to modify and/or distribute those modifications. The only exceptions that I can think of to this would be some license that was closed source but allowed you to distribute modifications to other licence holders. There are a few software titles that have a license like this.

So basically the answer is that you "probably" do not have the legal rite to distribute your modifications rather they infringe on copyright rules or not. So it becomes a moot point. Even if you could distribute, the question of rather your patches violate copyright is one that would probably have to be answered via trial as it would be unclear, and highly dependent on the overall content of the patches.

  • thanks for the contribution, it's interesting reading and gives me a lot to consider May 8 '15 at 12:28

If the project was released under an open-source license, then that license gives you permission to make modifications to the code and to distribute those modifications.

Most closed-source and proprietary licenses do not give you permission to make changes or to distribute (a changed version of) the software.
If you don't have permission to make changes, you are violating the rights of the copyright holder if you create (and distribute) a patch.

  • I checked the license, and it explicitly gives permission to make changes, but mentions nothing about distribution. Based on that, I think this is an issue of whether quoting limited code for purposes of highlighting what is removed could be considered copyright fair use. May 8 '15 at 12:52
  • @SimonStevens run it past your lawyer, but typically, the sin of omission in a contract (in this case the license) is on the person who wrote it (the product owner). You might be in the clear to distribute if nothing is mentioned about distributing modifications that they've given you the right to make. But seriously, run it past your lawyer.
    – RubberDuck
    May 8 '15 at 16:32
  • 1
    @RubberDuck: With copyright, the default is that only the author/copyright holder has the right to do something. Others need to get explicit permissions (usually done through a license). May 10 '15 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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