Skip to contentSkip to conversation

git-clone: honor --quiet

PATCH New Jim Meyering 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-clone: honor --quiet

I noticed that a cron-launched "git-clone --quiet" was generating progress output to standard error -- and thus always spamming me. The offending output was due to git-clone invoking git-read-tree with its undocumented -v option.
This change turns off "-v" for --quiet.

---
 git-clone.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
git-clone.sh +2 -1
index 786d65a..3f006d1 100755
@@ -401,7 +401,8 @@ Pull: refs/heads/$head_points_at:$origin
 
 	case "$no_checkout" in
 	'')
-		git-read-tree -m -u -v HEAD HEAD
+		test "z$quiet" = z && v=-v || v=
+		git-read-tree -m -u $v HEAD HEAD
 	esac
 fi
 rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"
Signature · 1 line
1.4.3.1.g178e-dirty