mirror of
https://git.dn42.dev/dn42/registry.git
synced 2025-07-20 09:26:59 +08:00
Various fixes to sign-my-commit:
- more consistent use of quotes - add additional feedback when signature is already detected - add --force option - only select latest signature if multiple signature headers found Fix squash-my-commit when signature not requested
This commit is contained in:
parent
90e85ae9cf
commit
21ed480098
2 changed files with 129 additions and 94 deletions
|
@ -30,13 +30,14 @@ usage()
|
|||
|
||||
do_push=0
|
||||
verify_only=0
|
||||
do_sign=0
|
||||
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
|
||||
-S)
|
||||
do_sign='-S'
|
||||
do_sign=1
|
||||
;;
|
||||
--push)
|
||||
do_push=1
|
||||
|
@ -156,7 +157,12 @@ $(git log --oneline HEAD ^dn42registry/master)"
|
|||
|
||||
# and finally squash
|
||||
git reset --soft dn42registry/master
|
||||
git commit "$do_sign" -m "$comment"
|
||||
if [ "$do_sign" -eq 1 ]
|
||||
then
|
||||
git commit -S -m "$comment"
|
||||
else
|
||||
git commit -m "$comment"
|
||||
fi
|
||||
|
||||
# show what happened
|
||||
echo '---'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue