git-js
git-js copied to clipboard
git.log should support single string format
Git offers a set of built-in single string formats ie- 'oneline, short, full, fuller' so git-js's git.log fn's format option should likewise adopt this shortcut to return the set of key/values which correspond to each said format.
git.log({ format : 'fuller'})
would return Git's 'fuller' set of values; from pretty-formats.txt
commit <hash>
Author: <author>
AuthorDate: <author-date>
Commit: <committer>
CommitDate: <committer-date>
(as a JS obj)
Thanks for the suggestion. If you're up for submitting a pull request, the options are currently parsed in https://github.com/steveukx/git-js/blob/d84dd63812f42d3502fcc6f623998623a322b20b/simple-git/src/lib/tasks/log.ts#L93