* git commit <path> scanning entire working tree?
@ 2009-02-16 22:58 skillzero
2009-02-17 0:28 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: skillzero @ 2009-02-16 22:58 UTC (permalink / raw)
To: git
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.
Is there a reason it needs to scan like this when the commit command
specifies a specific path? It seems like it would only need to scan
the path I've specified.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: git commit <path> scanning entire working tree?
2009-02-16 22:58 git commit <path> scanning entire working tree? skillzero
@ 2009-02-17 0:28 ` Junio C Hamano
2009-02-17 2:57 ` Boyd Stephen Smith Jr.
2009-02-17 3:37 ` skillzero
0 siblings, 2 replies; 7+ messages in thread
From: Junio C Hamano @ 2009-02-17 0:28 UTC (permalink / raw)
To: skillzero; +Cc: git
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: git commit <path> scanning entire working tree?
2009-02-17 0:28 ` Junio C Hamano
@ 2009-02-17 2:57 ` Boyd Stephen Smith Jr.
2009-02-17 3:37 ` skillzero
1 sibling, 0 replies; 7+ messages in thread
From: Boyd Stephen Smith Jr. @ 2009-02-17 2:57 UTC (permalink / raw)
To: Junio C Hamano; +Cc: skillzero, git
[-- Attachment #1: Type: text/plain, Size: 880 bytes --]
On Monday 16 February 2009 18:28:10 Junio C Hamano wrote:
> skillzero@gmail.com writes:
> > When I do a 'git commit <path to a single file>', git seems to scan
> > the entire working tree. [I]t 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", but
> also "Changed but not updated" and "Untracked files". You cannot generate
> the latter two lists without checking with your work tree.
So, specify one or more -m options and you shouldn't see the scan.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: git commit <path> scanning entire working tree?
2009-02-17 0:28 ` Junio C Hamano
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
1 sibling, 2 replies; 7+ messages in thread
From: skillzero @ 2009-02-17 3:37 UTC (permalink / raw)
To: git
On Mon, Feb 16, 2009 at 4:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
> Do you mean you edit the commit message, starting from the message
> template "git commit" gives you?
Yes, there's a large delay from me entering 'git commit -a' and when
the editor shows up.
> 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.
It seems like it shouldn't scan/show things outside of the path. If
I've specified a path on the command line, I most likely only care
about things in that path. I think it would make committing specific
paths much faster when you have a large tree. However, it would
eliminate information (changed/untracked files outside that path), if
people are relying on that.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: git commit <path> scanning entire working tree?
2009-02-17 3:37 ` skillzero
@ 2009-02-17 5:50 ` Boyd Stephen Smith Jr.
2009-02-17 7:12 ` Junio C Hamano
1 sibling, 0 replies; 7+ messages in thread
From: Boyd Stephen Smith Jr. @ 2009-02-17 5:50 UTC (permalink / raw)
To: skillzero; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
On Monday 16 February 2009 21:37:57 you wrote:
> On Mon, Feb 16, 2009 at 4:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
> > The template lists "Changes to be committed", but
> > also "Changed but not updated" and "Untracked files". You cannot
> > generate the latter two lists without checking with your work tree.
>
> It seems like it shouldn't scan/show things outside of the path. If
> I've specified a path on the command line, I most likely only care
> about things in that path. I think it would make committing specific
> paths much faster when you have a large tree. However, it would
> eliminate information (changed/untracked files outside that path), if
> people are relying on that.
Patches reviewed (and possibly accepted) here.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: git commit <path> scanning entire working tree?
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
1 sibling, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2009-02-17 7:12 UTC (permalink / raw)
To: skillzero; +Cc: git
skillzero@gmail.com writes:
> ... However, it would
> eliminate information (changed/untracked files outside that path), if
> people are relying on that.
People do rely on that information. Why else we would spend cycles to show
them?
There is a precedence to allow a configuration variable to skip various
computation to help slow systems, e.g. 6c2ce04 (Add argument 'no'
commit/status option -u|--untracked-files, 2008-06-05).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: git commit <path> scanning entire working tree?
2009-02-17 7:12 ` Junio C Hamano
@ 2009-02-18 2:25 ` skillzero
0 siblings, 0 replies; 7+ messages in thread
From: skillzero @ 2009-02-18 2:25 UTC (permalink / raw)
To: git
On Mon, Feb 16, 2009 at 11:12 PM, Junio C Hamano <gitster@pobox.com> wrote:
> skillzero@gmail.com writes:
> People do rely on that information. Why else we would spend cycles to show
> them?
My guess was that most people didn't work with very large trees. For
example, the Linux kernel tree stat's pretty quickly (.7 seconds when
hot on my machine), but my tree contains the code for an entire OS
distribution so even on a fast machine and OS, it takes many seconds.
My thinking was that in the case when a path was specified, people
might be less interested in changes/untracked files outside that path
(although I may be totally wrong). If a path wasn't specified, I can
see why it would be useful to show everything. I tend to do a 'git
status' then a bunch of 'git commit <path>' commands.
> There is a precedence to allow a configuration variable to skip various
> computation to help slow systems, e.g. 6c2ce04 (Add argument 'no'
> commit/status option -u|--untracked-files, 2008-06-05).
Thanks, I'll check it out. If that doesn't do what I need, maybe I can
trying changing git to add support for automatically skipping files
outside the specifies path and submit a patch for you guys to rip to
shreds :)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-02-18 2:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-16 22:58 git commit <path> scanning entire working tree? skillzero
2009-02-17 0:28 ` Junio C Hamano
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
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).