Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git.log should support single string format #883

Open
drschwabe opened this issue Jan 3, 2023 · 1 comment
Open

git.log should support single string format #883

drschwabe opened this issue Jan 3, 2023 · 1 comment

Comments

@drschwabe
Copy link
Contributor

drschwabe commented Jan 3, 2023

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)

@steveukx
Copy link
Owner

Thanks for the suggestion. If you're up for submitting a pull request, the options are currently parsed in

export function parseLogOptions<T extends Options>(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants