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

support git commit options within gitmoji -c #1040

Open
3 tasks done
AndreasAugustin opened this issue Mar 26, 2023 · 3 comments
Open
3 tasks done

support git commit options within gitmoji -c #1040

AndreasAugustin opened this issue Mar 26, 2023 · 3 comments
Assignees
Labels

Comments

@AndreasAugustin
Copy link
Contributor

AndreasAugustin commented Mar 26, 2023

Description of the problem

$ gitmoji -v
8.0.0

Currently it is not possible to use git commit flags and options when calling gitmoji -c.

Because of that some super useful options like git commit -S to sign the commits is not possible to be used within that command.

Solution

add the needed flags as optional parameters to the already supported flags.

Alternatives

Currently it is possible to add some of the flags to the git global settings. E.g. with the example for -S

git config --global commit.gpgsign true

Furthermore (fast reading the code) I think it should be possible to have this functionality using the --hook flag.
gitmoji --hook -S -m .... Need to verify.

This is possible but somehow not nice

Additional context

For me in special the -S option is needed and useful. In many projects I want and need to sign commits and should be considered as best practice. For more information please consider https://dev.to/andreasaugustin/git-how-and-why-to-sign-commits-35dn

There are many more useful options which are currently suppressed. Happy to discuss.

Validations

@carloscuesta
Copy link
Owner

carloscuesta commented Mar 26, 2023

Hey!

Thanks for opening an issue, completely agree, we should support all the same options that git accepts as a parameter without having to parse them on the cli. Any unknown option should be forwarded to the git binary.

Perhaps we can fix that by using allowUnknownFlags and passing those to git

https://github.com/sindresorhus/meow

Do you want to raise a pull-request?

@AndreasAugustin
Copy link
Contributor Author

Hey!

Thanks for opening an issue, completely agree, we should support all the same options that git accepts as a parameter without having to parse them on the cli. Any unknown option should be forwarded to the git binary.

Perhaps we can fix that by using allowUnknownFlags and passing those to git

https://github.com/sindresorhus/meow

Do you want to raise a pull-request?

Yes, I can raise a PR. Just cannot promise an ETA. Think I will be at least quite busy the next days (but it shouldn't be a huge change)

@carloscuesta
Copy link
Owner

Sounds awesome! I'll assign this to you, feel free to take the time you need ❤️

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

No branches or pull requests

2 participants