{"thread":{"id":"6953","subject":"[PATCH] git-fetch: add --quiet","startedAt":"2007-02-25T21:29:20Z","lastAt":"2007-02-25T21:29:20Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"35458","messageId":"7vzm72q633.fsf@assigned-by-dhcp.cox.net","threadId":"6953","inReplyTo":null,"subject":"[PATCH] git-fetch: add --quiet","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-25T21:29:20Z","receivedAt":"2007-02-25T21:29:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pass it to underlying fetch-pack, and also have it affect if -v\nis passed to http-fetch and rsync.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n * As I am only using git native protocols these days myself, I\n   did not check http or rsync -- they might be broken.  Tests\n   and fixes are appreciated from people who care about them\n   ;-).\n\n git-fetch.sh |   14 ++++++++++----\n 1 files changed, 10 insertions(+), 4 deletions(-)\n\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex 851ed6b..0b4922b 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -26,6 +26,7 @@ keep=\n shallow_depth=\n no_progress=\n test -t 1 || no_progress=--no-progress\n+quiet=\n while case \"$#\" in 0) break ;; esac\n do\n \tcase \"$1\" in\n@@ -56,6 +57,9 @@ do\n \t--update-head-o|--update-head-ok)\n \t\tupdate_head_ok=t\n \t\t;;\n+\t-q|--q|--qu|--qui|--quie|--quiet)\n+\t\tquiet=--quiet\n+\t\t;;\n \t-v|--verbose)\n \t\tverbose=Yes\n \t\t;;\n@@ -328,7 +332,8 @@ fetch_main () {\n \t  expr \"z$head\" : \"z$_x40\\$\" >/dev/null ||\n \t\tdie \"No such ref $remote_name at $remote\"\n \t  echo >&2 \"Fetching $remote_name from $remote using $proto\"\n-\t  git-http-fetch -v -a \"$head\" \"$remote/\" || exit\n+\t  case \"$quiet\" in '') v=-v ;; *) v= ;; esac\n+\t  git-http-fetch $v -a \"$head\" \"$remote/\" || exit\n \t  ;;\n       rsync://*)\n \t  test -n \"$shallow_depth\" &&\n@@ -337,8 +342,9 @@ fetch_main () {\n \t  rsync -L -q \"$remote/$remote_name\" \"$TMP_HEAD\" || exit 1\n \t  head=$(git-rev-parse --verify TMP_HEAD)\n \t  rm -f \"$TMP_HEAD\"\n+\t  case \"$quiet\" in '') v=-v ;; *) v= ;; esac\n \t  test \"$rsync_slurped_objects\" || {\n-\t      rsync -av --ignore-existing --exclude info \\\n+\t      rsync -a $v --ignore-existing --exclude info \\\n \t\t  \"$remote/objects/\" \"$GIT_OBJECT_DIRECTORY/\" || exit\n \n \t      # Look at objects/info/alternates for rsync -- http will\n@@ -379,8 +385,8 @@ fetch_main () {\n     ( : subshell because we muck with IFS\n       IFS=\" \t$LF\"\n       (\n-\t  git-fetch-pack --thin $exec $keep $shallow_depth $no_progress \\\n-\t\t\"$remote\" $rref ||\n+\t  git-fetch-pack --thin $exec $keep $shallow_depth \\\n+\t      $quiet $no_progress \"$remote\" $rref ||\n \t  echo failed \"$remote\"\n       ) |\n       (\n-- \n1.5.0.1.791.g4c9a\n"}]}