1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-20 04:40:08 +00:00

git-auto-fetch: silence stderr output (#7970)

Redirect stderr to avoid printing errors to the console when the ssh key is not
unlocked.
This commit is contained in:
Jackson Delahunt 2019-07-01 23:10:59 +10:00 committed by Marc Cornellà
parent 7b2c4327e7
commit c7a7b70e07

View file

@ -5,7 +5,7 @@ function git-fetch-all {
dir=`git rev-parse --git-dir` &&
[[ ! -f $dir/NO_AUTO_FETCH ]] &&
(( `date +%s` - `date -r $dir/FETCH_LOG +%s 2>/dev/null || echo 0` > $GIT_AUTO_FETCH_INTERVAL )) &&
git fetch --all &>! $dir/FETCH_LOG &)
git fetch --all 2>/dev/null &>! $dir/FETCH_LOG &)
}
function git-auto-fetch {