Add an output_nostrip kwarg to Git.execute#77
Conversation
The last line of the output normally is stripped if it is empty. If output_nostrip is True, this behavior is disabled. This can be important when constructing patches e.g. using the diff command.
|
Thanks for the fix. |
I tried this but it does not feel right for me. IMHO I try to come up with some test cases. |
|
Thanks for the unit test, its much appreciated. Besides that, I don't think one can compare a CLI with an API. The In APIs I consider it bad practice to negate something in the first place, and then have double-negations in the code like |
|
Following up in #79 |
The last line of the output normally is stripped if it is empty. If
output_nostripisTrue, this behavior is disabled. This can be important when constructing patches e.g. using thediffcommand.