From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Be more verbose when checkout takes a long time
Date: Sat, 23 Feb 2008 14:20:25 -0800 [thread overview]
Message-ID: <7v8x1b1fiu.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0802231323590.21332@woody.linux-foundation.org> (Linus Torvalds's message of "Sat, 23 Feb 2008 13:36:08 -0800 (PST)")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> So I find it irritating when git thinks for a long time without telling me
> what's taking so long. And by "long time" I definitely mean less than two
> seconds, which is already way too long for me.
Do you mean more than two or less than two?
> Now, git read-tree already had support for the "-v" flag that does nice
> updates about what's going on, but it was delayed by two seconds, and if
> the thing had already done more than half by then it would be quiet even
> after that, so in practice it meant that we migth be quiet for up to four
> seconds. Much too long.
Geez you are impatient ;-).
The other user of start_progress_delay uses 95% as cutoff. and
probably 50% was too low, but that may just be bikeshedding.
> ... Quite frankly, I'm not really sure why it disabled
> error messages in the first place: ...
> ...
> Now, I'm sure this had a good reason (for the "git checkout -m" case), but
> it did make the common case of git-checkout really annoying.
I agree. Perhaps we can add some message when "-m" codepath
falls back to the three-way merge to make "merge-error" less
scary. Perhaps like:
git-checkout.sh | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/git-checkout.sh b/git-checkout.sh
index bd74d70..5e36136 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -210,11 +210,14 @@ then
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) || (
- case "$merge" in
- '')
- echo >&2 "$merge_error"
+ git read-tree -$v m -u --exclude-per-directory=.gitignore $old $new || (
+ case "$merge,$v" in
+ ,*)
exit 1 ;;
+ 1,)
+ ;; # quiet
+ *)
+ echo >&2 "Falling back to 3-way merge..." ;;
esac
# Match the index to the working tree, and do a three-way.
next prev parent reply other threads:[~2008-02-23 22:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-23 21:36 Be more verbose when checkout takes a long time Linus Torvalds
2008-02-23 22:20 ` Junio C Hamano [this message]
2008-02-23 22:32 ` Linus Torvalds
2008-02-23 22:37 ` Junio C Hamano
2008-02-23 23:42 ` Junio C Hamano
2008-02-23 23:45 ` [PATCH] checkout: error out when index is unmerged even with -m Junio C Hamano
2008-02-24 6:29 ` Daniel Barkalow
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=7v8x1b1fiu.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.