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>
This commit is contained in:
parent
2cc3167c68
commit
4c474b6f92
@ -17,6 +17,7 @@ newbranch=
|
|||||||
newbranch_log=
|
newbranch_log=
|
||||||
merge=
|
merge=
|
||||||
quiet=
|
quiet=
|
||||||
|
v=-v
|
||||||
LF='
|
LF='
|
||||||
'
|
'
|
||||||
while [ "$#" != "0" ]; do
|
while [ "$#" != "0" ]; do
|
||||||
@ -47,6 +48,7 @@ while [ "$#" != "0" ]; do
|
|||||||
;;
|
;;
|
||||||
"-q")
|
"-q")
|
||||||
quiet=1
|
quiet=1
|
||||||
|
v=
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
break
|
break
|
||||||
@ -197,7 +199,7 @@ fi
|
|||||||
|
|
||||||
if [ "$force" ]
|
if [ "$force" ]
|
||||||
then
|
then
|
||||||
git-read-tree --reset -u $new
|
git-read-tree $v --reset -u $new
|
||||||
else
|
else
|
||||||
git-update-index --refresh >/dev/null
|
git-update-index --refresh >/dev/null
|
||||||
merge_error=$(git-read-tree -m -u --exclude-per-directory=.gitignore $old $new 2>&1) || (
|
merge_error=$(git-read-tree -m -u --exclude-per-directory=.gitignore $old $new 2>&1) || (
|
||||||
@ -210,7 +212,7 @@ else
|
|||||||
# Match the index to the working tree, and do a three-way.
|
# Match the index to the working tree, and do a three-way.
|
||||||
git diff-files --name-only | git update-index --remove --stdin &&
|
git diff-files --name-only | git update-index --remove --stdin &&
|
||||||
work=`git write-tree` &&
|
work=`git write-tree` &&
|
||||||
git read-tree --reset -u $new || exit
|
git read-tree $v --reset -u $new || exit
|
||||||
|
|
||||||
eval GITHEAD_$new='${new_name:-${branch:-$new}}' &&
|
eval GITHEAD_$new='${new_name:-${branch:-$new}}' &&
|
||||||
eval GITHEAD_$work=local &&
|
eval GITHEAD_$work=local &&
|
||||||
@ -221,7 +223,7 @@ else
|
|||||||
# this is not a real merge before committing, but just carrying
|
# this is not a real merge before committing, but just carrying
|
||||||
# the working tree changes along.
|
# the working tree changes along.
|
||||||
unmerged=`git ls-files -u`
|
unmerged=`git ls-files -u`
|
||||||
git read-tree --reset $new
|
git read-tree $v --reset $new
|
||||||
case "$unmerged" in
|
case "$unmerged" in
|
||||||
'') ;;
|
'') ;;
|
||||||
*)
|
*)
|
||||||
|
@ -71,7 +71,7 @@ then
|
|||||||
die "Cannot do a soft reset in the middle of a merge."
|
die "Cannot do a soft reset in the middle of a merge."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
git-read-tree --reset $update "$rev" || exit
|
git-read-tree -v --reset $update "$rev" || exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Any resets update HEAD to the head being switched to.
|
# Any resets update HEAD to the head being switched to.
|
||||||
|
Loading…
Reference in New Issue
Block a user