grunt-gitinfo
grunt-gitinfo copied to clipboard
git formatted output with quotes
First of all, thank you for your work.
The output of all the commands with --format option (lastCommitTime, lastCommitMessage, lastCommitAuthor) is surrounded with double quotes. Is there any specific reason? I mean, the format option in git doesn't need double quotes, and it is giving me some troubles using it with preprocess/usemin while putting in an html attribute.
If I can suggest a change, it would simply be to remove double quotes from the option
'local.branch.current.lastCommitTime' : ['log', '--format=%ai', '-n1', 'HEAD'], 'local.branch.current.lastCommitMessage' : ['log', '--format=%B', '-n1', 'HEAD'], 'local.branch.current.lastCommitAuthor' : ['log', '--format=%aN', '-n1', 'HEAD'],
If you agree I can submit a PR.
Cheers
I'm having the same problem.
I had opened PR #21 which got closed as cannot reproduce after 1.5 years (it was not a good solution, though).
Good to know. @drasive do you agree with my solution? I'm using the npm published version of this package for building in a production env now. If @damkraw can't reproduce this issue, I will definitely fork and use my version. It would be unfortunate though.
Yes I absolutely agree with your solution. @damkraw said he only tried to reproduce it on Mac OS and Linux, maybe it only affects Windows? I would be unfortunate but I would use your fork, as it is a requirement for me.
This issue also occurs for me on macOS, at least for local.branch.current.lastCommitTime
(have not tested the other properties).