{"thread":{"id":"7799","subject":"[PATCH] add file checkout progress","startedAt":"2007-04-23T17:17:19Z","lastAt":"2007-04-23T17:17:19Z","messageCount":1,"participants":["Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"40216","messageId":"alpine.LFD.0.98.0704231311540.28339@xanadu.home","threadId":"7799","inReplyTo":null,"subject":"[PATCH] add file checkout progress","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-04-23T17:17:19Z","receivedAt":"2007-04-23T17:17:19Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"It is nice to see what is happening when checking out large amount of \nfiles, either with git-checkout or git-reset.  The new progress code \nalready decides what is a \"significant amount\" and displays progress \nonly in that case..\n\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n---\n\ndiff --git a/git-checkout.sh b/git-checkout.sh\nindex deb0a9a..ed7c2c5 100755\n--- a/git-checkout.sh\n+++ b/git-checkout.sh\n@@ -17,6 +17,7 @@ newbranch=\n newbranch_log=\n merge=\n quiet=\n+v=-v\n LF='\n '\n while [ \"$#\" != \"0\" ]; do\n@@ -47,6 +48,7 @@ while [ \"$#\" != \"0\" ]; do\n \t\t;;\n \t\"-q\")\n \t\tquiet=1\n+\t\tv=\n \t\t;;\n \t--)\n \t\tbreak\n@@ -197,7 +199,7 @@ fi\n \n if [ \"$force\" ]\n then\n-    git-read-tree --reset -u $new\n+    git-read-tree $v --reset -u $new\n else\n     git-update-index --refresh >/dev/null\n     merge_error=$(git-read-tree -m -u --exclude-per-directory=.gitignore $old $new 2>&1) || (\n@@ -210,7 +212,7 @@ else\n \t# Match the index to the working tree, and do a three-way.\n     \tgit diff-files --name-only | git update-index --remove --stdin &&\n \twork=`git write-tree` &&\n-\tgit read-tree --reset -u $new || exit\n+\tgit read-tree $v --reset -u $new || exit\n \n \teval GITHEAD_$new='${new_name:-${branch:-$new}}' &&\n \teval GITHEAD_$work=local &&\n@@ -221,7 +223,7 @@ else\n \t# this is not a real merge before committing, but just carrying\n \t# the working tree changes along.\n \tunmerged=`git ls-files -u`\n-\tgit read-tree --reset $new\n+\tgit read-tree $v --reset $new\n \tcase \"$unmerged\" in\n \t'')\t;;\n \t*)\ndiff --git a/git-reset.sh b/git-reset.sh\nindex fee6d98..a172d7c 100755\n--- a/git-reset.sh\n+++ b/git-reset.sh\n@@ -71,7 +71,7 @@ then\n \t\tdie \"Cannot do a soft reset in the middle of a merge.\"\n \tfi\n else\n-\tgit-read-tree --reset $update \"$rev\" || exit\n+\tgit-read-tree -v --reset $update \"$rev\" || exit\n fi\n \n # Any resets update HEAD to the head being switched to.\n"}]}