Reduce output noise when delegated command made no change
This commit is contained in:
parent
b014a9a440
commit
75855a5e88
|
@ -130,8 +130,10 @@ gocrypt_delegate() {
|
|||
# Delegate command to another `pass` instance that manages what is inside of the mountpoint
|
||||
PASSWORD_STORE_DIR="$PWD/$gocrypt_dec_dir" "$PROGRAM" "$@"
|
||||
# Commit if there has been changes due to this operation
|
||||
_cmd_git add "$gocrypt_dir"
|
||||
_cmd_git commit -m "Encrypted pass operation inside gocrypt" "$gocrypt_dir" || echo "No git commit created"
|
||||
if [[ `_cmd_git status --porcelain=v1 "$gocrypt_dir"` ]]; then
|
||||
_cmd_git add "$gocrypt_dir"
|
||||
_cmd_git commit -m "Encrypted pass operation inside gocrypt" "$gocrypt_dir" || echo "No git commit created"
|
||||
fi
|
||||
}
|
||||
|
||||
gocrypt_crypt() {
|
||||
|
|
Loading…
Reference in New Issue