diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-02-05 20:31:02 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-02-05 20:31:02 +1300 |
commit | 8582b3de12e3063f81435c884e8db452cb809865 (patch) | |
tree | 80a568dc276de48b9569c1eec512f9b7323804f5 /bin/td.sh | |
parent | Merge branch 'feature/vim-php' into develop (diff) | |
download | dotfiles-8582b3de12e3063f81435c884e8db452cb809865.tar.gz dotfiles-8582b3de12e3063f81435c884e8db452cb809865.zip |
Suppress error messages in td(1df)
Don't report to the user when a repository is created, and ignore errors
from git-diff-index(1) for when there is no HEAD
Diffstat (limited to 'bin/td.sh')
-rw-r--r-- | bin/td.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -15,7 +15,7 @@ if ! command -v isgr >/dev/null 2>&1 ; then printf >&2 'isgr: command not found\n' exit 1 fi -isgr || git init || exit +isgr || git init --quiet || exit # If the to-do file doesn't exist yet, create it [ -e "$file" ] || touch -- "$file" || exit @@ -27,5 +27,5 @@ isgr || git init || exit git add -- "$file" # If there are changes to commit, commit them -git diff-index --quiet HEAD || +git diff-index --quiet HEAD 2>/dev/null || git commit --message 'Changed by td(1df)' --quiet |