Merge branch 'master' into improve-docs

pull/149/head
joshr 6 years ago
commit 8b2a1eab1d

@ -424,7 +424,7 @@ function _get_gpg_local {
function _abort {
local message="$1" # required
>&2 echo "$message abort."
>&2 echo "git-secret: abort: $message"
exit 1
}
@ -484,7 +484,9 @@ function _secrets_dir_exists {
full_path=$(_get_secrets_dir)
if [[ ! -d "$full_path" ]]; then
_abort "$full_path does not exist."
local name
name=$(basename "$full_path")
_abort "directory '$name' does not exist. Use 'git secret init' to initialize git-secret"
fi
}
@ -508,7 +510,7 @@ function _secrets_dir_is_not_ignored {
fi
if [[ ! $ignores -eq 1 ]]; then
_abort "'$git_secret_dir' is ignored."
_abort "'$git_secret_dir' is in .gitignore"
fi
}

@ -52,7 +52,7 @@ function add {
if [[ ! "${#not_ignored[@]}" -eq 0 ]]; then
# And show them all at once.
local message
message="these files are not ignored: $* ;"
message="these files are not in .gitignore: $* ;"
if [[ "$auto_ignore" -eq 0 ]]; then
# This file is not ignored. user don't want it to be added automatically.

@ -22,7 +22,7 @@ function killperson {
local emails=( "$@" )
if [[ ${#emails[@]} -eq 0 ]]; then
_abort "at least one email is required."
_abort "at least one email is required for killperson."
fi
# Getting the local `gpg` command:

@ -37,7 +37,7 @@ function remove {
# Checking if file exists:
if [[ ! -f "$path" ]]; then
_abort "$item is not a file."
_abort "not a file: $item"
fi
# Deleting it from path mappings:

@ -77,7 +77,7 @@ function tell {
fi
if [[ ! -s "$keyfile" ]]; then
_abort 'gpg key is empty. check your key name: "gpg --list-keys".'
_abort "no keyfile found for '$email'. Check your key name: 'gpg --list-keys'."
fi
# Importing public key to the local keychain:

@ -7,7 +7,7 @@ function _check_setup {
local is_tree
is_tree=$(_is_inside_git_tree)
if [[ "$is_tree" -ne 0 ]]; then
_abort "repository is broken. try running 'git init' or 'git clone'."
_abort "not in dir with git repo. Use 'git init' or 'git clone', then in repo use 'git secret init'"
fi
# Checking if the '.gitsecret' is not ignored:
@ -27,7 +27,7 @@ function _check_setup {
function _incorrect_usage {
echo "$1"
echo "git-server: abort: $1"
usage
exit "$2"
}

@ -71,6 +71,6 @@ function teardown {
mkdir "$secrets_dir"
run git secret init
[ "$output" = "already inited. abort." ]
[ "$output" = "git-secret: abort: already inited." ]
[ "$status" -eq 1 ]
}

Loading…
Cancel
Save