whitespace and better git detection
This commit is contained in:
parent
f8427ccf2d
commit
8b5691dbc5
9
sig
9
sig
|
@ -339,7 +339,7 @@ verify(){
|
|||
local -r group="${2}"
|
||||
local -r ref=${3:-HEAD}
|
||||
local sig_count=0 seen_fps fp commit_sig tag_sigs note_sigs
|
||||
[ -d .git ] || [ -L .git ] || [ -f .git ] \
|
||||
git rev-parse --git-dir >/dev/null 2>&1 \
|
||||
|| die "Error: This folder is not a git repository"
|
||||
if [[ $(git diff --stat) != '' ]]; then
|
||||
die "Error: git tree is dirty"
|
||||
|
@ -411,7 +411,7 @@ get_temp(){
|
|||
## Add signed tag pointing at this commit.
|
||||
## Optionally push to origin.
|
||||
sign_tag(){
|
||||
[ -d '.git' ] \
|
||||
git rev-parse --git-dir >/dev/null 2>&1 \
|
||||
|| die "Not a git repository"
|
||||
command -v git >/dev/null \
|
||||
|| die "Git not installed"
|
||||
|
@ -431,7 +431,7 @@ sign_tag(){
|
|||
## Add signed git note to this commit
|
||||
## Optionally push to origin.
|
||||
sign_note() {
|
||||
[ -d '.git' ] \
|
||||
git rev-parse --git-dir >/dev/null 2>&1 \
|
||||
|| die "Not a git repository"
|
||||
command -v git >/dev/null \
|
||||
|| die "Git not installed"
|
||||
|
@ -542,7 +542,8 @@ cmd_add(){
|
|||
--) shift; break ;;
|
||||
esac done
|
||||
case $method in
|
||||
git) sign_note "$push" ;;
|
||||
note) sign_note "$push" ;;
|
||||
tag) sign_tag "$push" ;;
|
||||
*) sign_note "$push" ;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue