JarvusInnovations / git-client

Promise-based git client that mostly just executes the git binary
MIT License
7 stars 0 forks source link

line trimming interferes with `git status --porcelain` #20

Open jimlloyd opened 4 years ago

jimlloyd commented 4 years ago

I need to parse the output of git status --porcelain, in which leading spaces on the line are significant. The use of the method trim() removes spaces from both ends of the string, which corrupts the input before I can parse it.

themightychris commented 4 years ago

@jimlloyd thanks for the report! Have you experimented with removing it already? I'm wondering where there might be negative side effects of removing the default trimming or limiting it to trailing whitespace or even just newlines

Worst case, it might need to be an exec option to suppress it