@matheusbsbs / matheus-bagliano / commits / 4c474b6f92
Fork 0

add file checkout progress

It is nice to see what is happening when checking out large amount of files, either with git-checkout or git-reset. The new progress code already decides what is a "significant amount" and displays progress only in that case.. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Nicolas Pitre committed Apr 23, 2007 at 13:17 UTC 4c474b6f92a2aa0b5aea282fe281e8f65279380a
2 files changed +6 -4
git-checkout.sh
+5 -3
@@ -17,6 +17,7 @@ newbranch=
17 newbranch_log=
18 merge=
19 quiet=
20 +v=-v
21 LF='
22 '
23 while [ "$#" != "0" ]; do
@@ -47,6 +48,7 @@ while [ "$#" != "0" ]; do
48 ;;
49 "-q")
50 quiet=1
51 + v=
52 ;;
53 --)
54 break
@@ -197,7 +199,7 @@ fi
199
200 if [ "$force" ]
201 then
200 - git-read-tree --reset -u $new
202 + git-read-tree $v --reset -u $new
203 else
204 git-update-index --refresh >/dev/null
205 merge_error=$(git-read-tree -m -u --exclude-per-directory=.gitignore $old $new 2>&1) || (
@@ -210,7 +212,7 @@ else
212 # Match the index to the working tree, and do a three-way.
213 git diff-files --name-only | git update-index --remove --stdin &&
214 work=`git write-tree` &&
213 - git read-tree --reset -u $new || exit
215 + git read-tree $v --reset -u $new || exit
216
217 eval GITHEAD_$new='${new_name:-${branch:-$new}}' &&
218 eval GITHEAD_$work=local &&
@@ -221,7 +223,7 @@ else
223 # this is not a real merge before committing, but just carrying
224 # the working tree changes along.
225 unmerged=`git ls-files -u`
224 - git read-tree --reset $new
226 + git read-tree $v --reset $new
227 case "$unmerged" in
228 '') ;;
229 *)
git-reset.sh
+1 -1
@@ -71,7 +71,7 @@ then
71 die "Cannot do a soft reset in the middle of a merge."
72 fi
73 else
74 - git-read-tree --reset $update "$rev" || exit
74 + git-read-tree -v --reset $update "$rev" || exit
75 fi
76
77 # Any resets update HEAD to the head being switched to.