Re: git stash takes excessively long when many untracked files present

2013-08-15 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: In any case, this is a regression introduced in 'master' since the last release, and the attempted fix was for an issue that has long been with us, so I'll revert a7365313 (git stash: avoid data loss when git stash save kills a directory, 2013-06-28)

Re: git stash takes excessively long when many untracked files present

2013-08-15 Thread Josh Triplett
On Thu, Aug 15, 2013 at 10:52:39AM -0700, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: In any case, this is a regression introduced in 'master' since the last release, and the attempted fix was for an issue that has long been with us, so I'll revert a7365313 (git stash:

Re: git stash takes excessively long when many untracked files present

2013-08-15 Thread Junio C Hamano
Josh Triplett j...@joshtriplett.org writes: I've already reverted the problematic patch to git stash and it will not be part of the upcoming release. Thanks! Here is a quick attempt to see if we can do better in ls-files -k. Having said that, I am curious if the result of applying the

Re: git stash takes excessively long when many untracked files present

2013-08-15 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: diff --git a/dir.c b/dir.c index 910bfcd..02939e2 100644 --- a/dir.c +++ b/dir.c @@ -1183,6 +1183,15 @@ static enum path_treatment treat_one_path(struct dir_struct *dir, cache_name_exists(path-buf, path-len, ignore_case))

Re: git stash takes excessively long when many untracked files present

2013-08-13 Thread Anders Darander
Josh Triplett josh at joshtriplett.org writes: [CCing folks involved in the recent stash-refuse-to-kill merge.] I keep portions of my home directory in git. I tried to git stash some local changes, and it ran for several minutes with no progress. ps showed that it was running git ls-files

Re: git stash takes excessively long when many untracked files present

2013-08-13 Thread Junio C Hamano
Anders Darander anders.daran...@gmail.com writes: diff --git a/git-stash.sh b/git-stash.sh index 85c9e2c..e5a2043 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -263,7 +263,7 @@ save_stash () { exit 0 fi if test -z $untracked$force - test -n

Re: git stash takes excessively long when many untracked files present

2013-08-13 Thread Anders Darander
(I'm resending this as Gmail added some html parts...) Junio C Hamano gits...@pobox.com wrote: Anders Darander anders.daran...@gmail.com writes: diff --git a/git-stash.sh b/git-stash.sh index 85c9e2c..e5a2043 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -263,7 +263,7 @@ save_stash ()

Re: git stash takes excessively long when many untracked files present

2013-08-13 Thread Junio C Hamano
Anders Darander anders.daran...@gmail.com writes: Do anyone have any better idea on how to approach this? Teaching ls-files to leave early once it seens even a single output is probably a possibility. Would that mean that we're able to fail early? Heh, good point. Leave once you find one

Re: git stash takes excessively long when many untracked files present

2013-08-13 Thread Junio C Hamano
[administrivia: people on the original thread added back on CC] Junio C Hamano gits...@pobox.com writes: Anders Darander anders.daran...@gmail.com writes: Do anyone have any better idea on how to approach this? Teaching ls-files to leave early once it seens even a single output is probably a

git stash takes excessively long when many untracked files present

2013-08-10 Thread Josh Triplett
[CCing folks involved in the recent stash-refuse-to-kill merge.] I keep portions of my home directory in git. I tried to git stash some local changes, and it ran for several minutes with no progress. ps showed that it was running git ls-files --killed, which was taking 100% CPU, and