git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: skillzero@gmail.com
Cc: git@vger.kernel.org
Subject: Re: git commit <path> scanning entire working tree?
Date: Mon, 16 Feb 2009 16:28:10 -0800	[thread overview]
Message-ID: <7vwsbpewkl.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <2729632a0902161458m732af362od59e5f35af5643c3@mail.gmail.com> (skillzero@gmail.com's message of "Mon, 16 Feb 2009 14:58:08 -0800")

skillzero@gmail.com writes:

> When I do a 'git commit <path to a single file>', git seems to scan
> the entire working tree. Since my tree is relatively large (and when
> on Windows, stat'ing is even slower), it takes quite a while (5 or so
> seconds) before I can even edit the commit message.

Do you mean you edit the commit message, starting from the message
template "git commit" gives you?

The template lists "Changes to be committed" (which obviously would list
only the path that matches the single pathspec you give to the command,
and there is no need to scan the whole tree -- it only needs to check the
file or a directory hierarchy if the pathspec matches a directory), but
also "Changed but not updated" and "Untracked files".  You cannot generate
the latter two lists without checking with your work tree.

  reply	other threads:[~2009-02-17  0:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-16 22:58 git commit <path> scanning entire working tree? skillzero
2009-02-17  0:28 ` Junio C Hamano [this message]
2009-02-17  2:57   ` Boyd Stephen Smith Jr.
2009-02-17  3:37   ` skillzero
2009-02-17  5:50     ` Boyd Stephen Smith Jr.
2009-02-17  7:12     ` Junio C Hamano
2009-02-18  2:25       ` skillzero

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=7vwsbpewkl.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=skillzero@gmail.com \
    /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).