What are the consequences of pushing a git repository that has an open-source license violation in its history, but not the current head?
Consider this scenario:
- I have a git repository with some open source software I am writing.
- I copy in a block of code from another MIT licensed software project, neglecting to include the copyright notice or MIT license text.
- I commit my changes, creating change
ab78e7e
. - I realize my mistake, and add in the relevant copyright notice and license text for the snippet I copied.
- I create a new commit,
b80c081
, and push my changes to a public git repository.
Is it a problem that this ab78e7e
commit exists in the history of my git repository? After all, someone could clone the repository and run git checkout ab78e7e
to obtain a copy of code that is in violation of the MIT license.
Do I have an obligation to squash these commits or otherwise modify the history of the repository such that there is no infringement at any point in history, regardless of the state of any published branches or tags?
I have seen GitHub issues and pull-requests that address cases where the author neglected to properly attribute code snippets. It seems like pushing a new commit to fix such a problem is not really a full solution. But it could also be disastrous to modify the history of a widely used repository.