git log -p unexpected behaviour - security risk?
- From
John Tapsell <johnflux@gmail.com>
- Date
- Apr 11, 2013, 10:36 UTC
- Message-ID
- <CAHQ6N+qdA5Lck1_ByOYPOG4ngsztz3HQSw8c_U_K8OnDapj4bQ@mail.gmail.com>
Hi,
I noticed that code that you put in merge will not be visible by default. This seems like a pretty horrible security problem, no?
I made the following test tree, with just 3 commits:
https://github.com/johnflux/ExampleEvilness.git
Doing "git log -p" shows all very innocent commits. Completely hidden is the change to add "EVIL CODE MUWHAHAHA".
This seems really dangerous!
The evil code only shows up with the non-default --cc or -m option.
Is there a way to make --cc default?
John