From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] add file checkout progress
Date: Mon, 23 Apr 2007 13:17:19 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.0.98.0704231311540.28339@xanadu.home> (raw)
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>
---
diff --git a/git-checkout.sh b/git-checkout.sh
index deb0a9a..ed7c2c5 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -17,6 +17,7 @@ newbranch=
newbranch_log=
merge=
quiet=
+v=-v
LF='
'
while [ "$#" != "0" ]; do
@@ -47,6 +48,7 @@ while [ "$#" != "0" ]; do
;;
"-q")
quiet=1
+ v=
;;
--)
break
@@ -197,7 +199,7 @@ fi
if [ "$force" ]
then
- git-read-tree --reset -u $new
+ git-read-tree $v --reset -u $new
else
git-update-index --refresh >/dev/null
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.
git diff-files --name-only | git update-index --remove --stdin &&
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_$work=local &&
@@ -221,7 +223,7 @@ else
# this is not a real merge before committing, but just carrying
# the working tree changes along.
unmerged=`git ls-files -u`
- git read-tree --reset $new
+ git read-tree $v --reset $new
case "$unmerged" in
'') ;;
*)
diff --git a/git-reset.sh b/git-reset.sh
index fee6d98..a172d7c 100755
--- a/git-reset.sh
+++ b/git-reset.sh
@@ -71,7 +71,7 @@ then
die "Cannot do a soft reset in the middle of a merge."
fi
else
- git-read-tree --reset $update "$rev" || exit
+ git-read-tree -v --reset $update "$rev" || exit
fi
# Any resets update HEAD to the head being switched to.
reply other threads:[~2007-04-23 17:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.0.98.0704231311540.28339@xanadu.home \
--to=nico@cam.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).