diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-12 14:33:34 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-12 14:33:34 -0700 |
commit | eded74fb34a4a2ea745471703413ed12a30202f7 (patch) | |
tree | 43a566c067e590bcd12342787a1ebc02f2a0cf97 /hooks | |
parent | c6098bd1ac24723cae4872dc096d7a6e33bef0df (diff) | |
download | dotfiles-eded74fb34a4a2ea745471703413ed12a30202f7.tar.gz |
permit configuring local branches not to require Signed-off-by:
Diffstat (limited to 'hooks')
-rwxr-xr-x | hooks/git/pre-push_signed-off-by | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hooks/git/pre-push_signed-off-by b/hooks/git/pre-push_signed-off-by index 775f505c..47321be6 100755 --- a/hooks/git/pre-push_signed-off-by +++ b/hooks/git/pre-push_signed-off-by @@ -15,6 +15,12 @@ while read local_ref local_sha remote_ref remote_sha; do elif echo "$remote_ref" | grep -Eq "^refs/heads/(wip|tmp)/"; then # wip/ branches may contain commits which are not signed off : + elif [ $(git config --get --type=bool --default=false \ + branch.${local_ref#refs/heads/}.signOffOptional) \ + = "true" ]; then + # some local branches may be configured not to require signing + # off wherever they are pushed + : else if [ "$remote_sha" = $z40 ] then |