|
|
|
|
|
by pc2g4d
4078 days ago
|
|
> Or is it to be able to "subtly add code" to existing repositories without being seen ? I don't think it's this---I understand it to be basically impossible to mess with git repository histories without people noticing. I guess they might try to sneak it in as a new commit, but hopefully others on the project are inspecting things??? |
|
Process would be something like: -- Take the original chain. -- Identify a patch in the past where you want to insert the code -- Check out back to that patch -- Make the change -- Roll forward with all the following patches re-applied (with new hashes of course) -- Replace the repo with the new repo.
The end result is that hashes would change. So if you were talking to people about a particular patch using its hash, or telling people a particular release is set at a particular hash, you would notice when this changes. So it wouldn't be invisible using this method.
An alternative approach might be to generate a series of innocuous code changes that will produce the end result of restoring the hashes of the latest commit to what they should have been before the change. This might be extremely difficult or computationally intensive, unless the hash algo is weak.
But it seems theoretically possible, unless I'm missing something about how git works.