08d5c936c670bd7e37902f64a065ba9f74452cb9

Author
Syphdias <syphdias+git@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

fix(git-auto-fetch): avoid password prompt with `GIT_TERMINAL_PROMPT=0` (#11234)

Diff

 1diff --git a/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh b/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
 2index 2e029639c719c76b49a564adf14adac7e572f584..2df34bb7b581c51340cd48f9a41c5b1094e7b9ce 100644
 3--- a/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
 4+++ b/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
 5@@ -28,6 +28,7 @@ function git-fetch-all {
 6     # Fetch all remotes (avoid ssh passphrase prompt)
 7     date -R &>! "$gitdir/FETCH_LOG"
 8     GIT_SSH_COMMAND="command ssh -o BatchMode=yes" \
 9+    GIT_TERMINAL_PROMPT=0 \
10       command git fetch --all 2>/dev/null &>> "$gitdir/FETCH_LOG"
11   ) &|
12 }