git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Paul Ebermann <Paul-Ebermann@gmx.de>
Cc: git@vger.kernel.org, "Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [PATCH/WIP] completion: complete git diff with only changed files.
Date: Thu, 19 May 2011 10:07:18 -0700	[thread overview]
Message-ID: <7vipt68vqx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4DD50DA9.8010305@gmx.de> (Paul Ebermann's message of "Thu, 19 May 2011 14:31:37 +0200")

Paul Ebermann <Paul-Ebermann@gmx.de> writes:

> For me, it is not so much about saving CPU cycles (I have enough of
> these) but about not seeing things I don't want to see, and helping me
> decide what to type. This might be against the Git philosophy, I'm
> starting to realize.

I would say Git UI philosophy is it is justified to spend CPU cycles in
order to reduce brain cycles (of course it does not justify spending extra
CPU cycles for no gain), but your change cuts both ways. In the use case I
presented, it _wasted_ a dozen or so seconds of my brain cycle before I
get what I wanted to see. In your use case, it will reduce the need to
waste your brain cycle skiping the completion you would not want to see to
get to what you want. So I am not fundamentally opposed to the change, but
the trade-off will largely depend on what your workflow is and what system
you are on.

One thing that I am worried about is the latency before getting the list
of completion. I've heard enough horror stories on a filesystem with slow
lstat(3) even "diff-files --name-only" introduces a noticeable lag, so I
am not sure limiting this new codepath only to the case where you know the
comparison is made between the index and the working tree would save those
folks.

There already are existing knobs in the completion script to tweak how
much extra cycles the user is willing to spend to generate PS1. Perhaps
the new codepath can be made to trigger only to people who want it (or the
other way around, to allow people to disable)?

      reply	other threads:[~2011-05-19 17:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18  0:15 [PATCH/WIP] completion: complete git diff with only changed files Paul Ebermann
2011-05-18  5:29 ` Junio C Hamano
2011-05-18 13:22   ` Paul Ebermann
2011-05-18 20:00     ` Junio C Hamano
2011-05-19 12:31       ` Paul Ebermann
2011-05-19 17:07         ` Junio C Hamano [this message]

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=7vipt68vqx.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Paul-Ebermann@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.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 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).