Repository navigation
Conversation
Signed-off-by: vjymisal0 <misalvijay153@gmail.com>
There was a problem hiding this comment.
Thanks for working on this. I'm thinking that it may be useful to customize not just the prefix, but also the suffix as well. What do you think of passing --commit-template, with the default value being {}, which represents the message that is currently? There may be a better argument name or token which will be replaced with the substituted message.
Use a {} placeholder for the default commit message so text can be
added before or after it, as suggested in review. Regenerate the
git-cp man pages.
Signed-off-by: vjymisal0 <misalvijay153@gmail.com>
|
Good idea @hyperupcall, a template is more flexible than a prefix. I replaced Also regenerated |
|
Closing this since the contribution policies were not followed. |
Summary
Add
git cp --commit-template TEMPLATE. Every{}in the template is replaced with the default commit message, so text can go before or after it (e.g.--commit-template "#1252 {}"or--commit-template "{} [skip ci]"). The default is{}, so existing invocations keep their messages.Verification
bats tests/git-cp.bats: 4 passed (prefix, suffix, missing value, default invocation)bats ./testssuite: 88 passedshellcheck bin/git-cp: cleanFixes #1252