-
Notifications
You must be signed in to change notification settings - Fork 24
Mailmap Support and Other Changes #32
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
Conversation
This version took a big performance hit whenver I added shortstat to it. To counteract that I am only loading in the SHA first and fetching all extra data after the commit has been selected. This simplifies the commit parsing, allows for more flexibility with data retrieved and reduces memory footprint of the game (especially relevant in large repos).
And fixup author trailing whitespace
And use heredocs in favor of multiple puts/prints And add more options for help command
Based on feedback that time betweem questions is too short Fix multiple choice shuffling issue that cause indexes to not be lined up
|
Hi, thanks so much for this! Can I ask for one little change: I like showing the "Commit stats" by default, but could you add a command-line argument like |
That sounds perfect! I will add a commit for that later today. :) |
Show commit stats by default, this is normal difficulty.
Hide stats when --hard is passed.
Slight refactor of command line args so user can pass --hard and other git
options.
ex: git game --hard --after={2023-01-01}
And encourage use of --help and -h flags, but still support git game help.
--help does not work when called with git game. It may be getting picked up by git before git-game has a chance to parse it. I get the message: No manual entry for git-game But it works as expected with git-game --help so I am leaving it in.
|
@jsomers I added a couple commits for the |
|
Thank you for merging! Since there's now a couple new features, it might be a good idea to create a new release and bump the Homebrew formula. What do you think? And if you would like me to take care of any of that for you let me know! |
|
If it's not too much trouble for you to take a crack, have at it! Let me know if you need me to make you a collaborator on the repo or anything. (As you can see, I'm pretty slow here :P) |
Ok, I will put together a PR! Being a collaborator would be super helpful for creating a new release, thank you so much. I appreciate your help so far, I didn't even expect a response at all so slow responses are amazing in comparison. |
|
@coffee-dan I invited you to be a collaborator. Thanks for the help so far! |
Fixes and Features
I really enjoyed this game and have put together this PR in hopes of addressing all of the issues I found while playing. The main issue is mailmap support. Let me know what you think. :)
Fixes
Use name defined in mailmap
See: Git - git-log Documentation author name
To utilize the local mailmap definition of committers the
--prettyformat string must use%aN.This resolves #19
Handle bad input
Git game will exit if git itself cannot handle the custom input provided.
This is similar to #30
Use up to date Git documentation links
Used in README and help text
Dead link: http://gitref.org/inspect/
Official documentation: https://git-scm.com/docs/git-log
Accept a variety of help args
git game --helpandgit game -hnow acceptedNew Features
Commit stats
Along with name and date, show a short description of changes.
End the game when all commits have been shown
Git game will exit once all commits have been shown, congratulating the user and showing longest streak.
This is similar to #30
Prompt user to move on to next question
This is based on feedback I got from friends that the game moves a little too fast.