Minor builtin 'git am' side-effect
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Aug 20, 2015, 13:22 UTC
- Message-ID
- <20150820152247.Horde.3yFLIbhFFocB99yz8o1iwg1@webmail.informatik.kit.edu>
Hi,
The format of the files '.git/rebase-apply/{next,last}' changed slightly with the recent builtin 'git am' conversion: while these files were newline-terminated when written by the scripted version, the ones written by the builtin are not.
This probably makes no difference for shell scripts looking at these files, e.g. our __git_ps1() handles both just fine. However, it can break C programs, when after strtol()ing the contents of the files they get defensive and check for the terminating newline at *endptr (this is how I noticed, as one of my pet projects did just that).
I'm not saying that the new behavior is bad and should be fixed; I merely point it out and leave the rest for you to decide.
Best, Gábor