Re: git commit <path> scanning entire working tree?

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: git commit <path> scanning entire working tree?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:13

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.

Re: git commit <path> scanning entire working tree?

From: Boyd Stephen Smith Jr. <hidden>
Date: 2016-06-15 22:46:13

On Monday 16 February 2009 18:28:10 Junio C Hamano wrote:
skillzero@gmail.com writes:
quoted
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/                    \_/

Re: git commit <path> scanning entire working tree?

From: <hidden>
Date: 2016-06-15 22:46:13

On Mon, Feb 16, 2009 at 4:28 PM, Junio C Hamano [off-list ref] 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.

Re: git commit <path> scanning entire working tree?

From: Boyd Stephen Smith Jr. <hidden>
Date: 2016-06-15 22:46:13

On Monday 16 February 2009 21:37:57 you wrote:
On Mon, Feb 16, 2009 at 4:28 PM, Junio C Hamano [off-list ref] wrote:
quoted
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/                    \_/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help