[PATCH] hashmap.h: make sure map entries are tightly packed

2014-02-08 Thread Karsten Blees
/cgi-bin/getdoc.cgi/0650/bks/SGI_Developer/books/Pragmas/sgi_html/ch04.html Not supported: http://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-DD32852C-A0F9-4AC6-BF67-D10D064CC87A.htm Signed-off-by: Karsten Blees bl...@dcon.de --- hashmap.h | 7

Re: Make the git codebase thread-safe

2014-02-12 Thread Karsten Blees
Am 12.02.2014 04:43, schrieb Duy Nguyen: On Wed, Feb 12, 2014 at 9:02 AM, Robin H. Johnson robb...@gentoo.org wrote: On Tue, Feb 11, 2014 at 05:54:51PM -0800, Stefan Zager wrote: We in the chromium project have a keen interest in adding threading to git in the pursuit of performance for

Re: Make the git codebase thread-safe

2014-02-12 Thread Karsten Blees
Am 12.02.2014 19:37, schrieb Erik Faye-Lund: On Wed, Feb 12, 2014 at 7:34 PM, Stefan Zager sza...@google.com wrote: On Wed, Feb 12, 2014 at 10:27 AM, Erik Faye-Lund kusmab...@gmail.com wrote: On Wed, Feb 12, 2014 at 7:20 PM, Stefan Zager sza...@google.com wrote: I don't want to steal the

Re: Make the git codebase thread-safe

2014-02-12 Thread Karsten Blees
Am 13.02.2014 00:03, schrieb Mike Hommey: On Wed, Feb 12, 2014 at 12:00:19PM +0100, Karsten Blees wrote: Am 12.02.2014 04:43, schrieb Duy Nguyen: On Wed, Feb 12, 2014 at 9:02 AM, Robin H. Johnson robb...@gentoo.org wrote: On Tue, Feb 11, 2014 at 05:54:51PM -0800, Stefan Zager wrote: We

Re: Make the git codebase thread-safe

2014-02-13 Thread Karsten Blees
Am 13.02.2014 19:38, schrieb Zachary Turner: The only reason ReOpenFile is necessary at all is because some code somewhere is mixing read-styles against the same fd. I don't understand...ReadFile with OVERLAPPED parameter doesn't modify the HANDLE's file position, so you should be able

Re: Make the git codebase thread-safe

2014-02-14 Thread Karsten Blees
. On Thu, Feb 13, 2014 at 2:53 PM, Stefan Zager sza...@google.com wrote: On Thu, Feb 13, 2014 at 2:51 PM, Karsten Blees karsten.bl...@gmail.com wrote: Am 13.02.2014 19:38, schrieb Zachary Turner: The only reason ReOpenFile is necessary at all is because some code somewhere is mixing read-styles

Re: Make the git codebase thread-safe

2014-02-14 Thread Karsten Blees
Am 14.02.2014 20:16, schrieb Zachary Turner: For the mixed read, we wouldn't be looking for another caller of pread() (since it doesn't care what the file pointer is), but instead a caller of read() or lseek() (since those do depend on the current file pointer). In index-pack.c, I see two

Re: Branch Name Case Sensitivity

2014-02-27 Thread Karsten Blees
Am 27.02.2014 21:32, schrieb Torsten Bögershausen: On 2014-02-27 20.50, Junio C Hamano wrote: Lee Hopkins leer...@gmail.com writes: Last week I ran across a potential bug with branch names on case insensitive file systems, the complete scenario can be found here:

Re: Branch Name Case Sensitivity

2014-02-28 Thread Karsten Blees
Am 28.02.2014 07:41, schrieb Johannes Sixt: Am 2/28/2014 0:38, schrieb Lee Hopkins: If I understand the issue correctly, the problem is that packed-refs are always case-sensitive, even if core.ignorecase=true. OTOH, core.ignorecase is intended to affect filenames of the worktree, not

Re: Branch Name Case Sensitivity

2014-03-03 Thread Karsten Blees
Am 01.03.2014 07:54, schrieb Torsten Bögershausen: On 2014-03-01 03.42, Lee Hopkins wrote: + +if(ignore_case) Only looking at ignore_case here closes the door for people who have a branch foo and Foo at the same time. (Which means that they are carefully running git pack-refs) How about

Re: Branch Name Case Sensitivity

2014-03-04 Thread Karsten Blees
Am 03.03.2014 18:51, schrieb Junio C Hamano: Lee Hopkins leer...@gmail.com writes: I went ahead and took a stab at a solution. My solution is more aggressive than a warning, I actually prevent the creation of ambiguous refs. My changes are also in refs.c, which may not be appropriate, but

Re: question about: Facebook makes Mercurial faster than Git

2014-03-10 Thread Karsten Blees
Am 10.03.2014 12:42, schrieb Dennis Luehring: Am 10.03.2014 12:28, schrieb demerphq: I had the impression, and I would not be surprised if they had the impression that the git development community is relatively unconcerned about performance issues on larger repositories. so the question is

Re: [RFC/WIP] Pluggable reference backends

2014-03-11 Thread Karsten Blees
Am 10.03.2014 12:00, schrieb Michael Haggerty: Reference transactions -- Very cool ideas indeed. However, I'm concerned a bit that transactions are conceptual overkill. How many concurrent updates do you expect in a repository? Wouldn't a single repo-wide lock suffice

Re: [PATCH] Enable index-pack threading in msysgit.

2014-03-20 Thread Karsten Blees
Am 19.03.2014 01:46, schrieb sza...@chromium.org: This adds a Windows implementation of pread. Note that it is NOT safe to intersperse calls to read() and pread() on a file descriptor. This is a bad idea. You're basically fixing the multi-threaded issue twice, while at the same time breaking

Re: [PATCH] Enable index-pack threading in msysgit.

2014-03-20 Thread Karsten Blees
Am 20.03.2014 17:08, schrieb Stefan Zager: On Thu, Mar 20, 2014 at 6:54 AM, Karsten Blees karsten.bl...@gmail.com wrote: Am 19.03.2014 01:46, schrieb sza...@chromium.org: This adds a Windows implementation of pread. Note that it is NOT safe to intersperse calls to read() and pread

Re: [PATCH] Enable index-pack threading in msysgit.

2014-03-21 Thread Karsten Blees
Am 20.03.2014 02:25, schrieb Duy Nguyen: On Thu, Mar 20, 2014 at 4:35 AM, Stefan Zager sza...@chromium.org wrote: This adds a Windows implementation of pread. Note that it is NOT safe to intersperse calls to read() and pread() on a file descriptor. According to the ReadFile spec, using the

Re: [PATCH] Enable index-pack threading in msysgit.

2014-03-21 Thread Karsten Blees
Am 21.03.2014 06:35, schrieb Stefan Zager: On Thu, Mar 20, 2014 at 10:21 PM, Duy Nguyen pclo...@gmail.com wrote: On Fri, Mar 21, 2014 at 08:51:18AM +0700, Duy Nguyen wrote: On Thu, Mar 20, 2014 at 11:08 PM, Stefan Zager sza...@chromium.org wrote: Duy, would you like to re-post your patch

Re: [PATCH] Enable index-pack threading in msysgit.

2014-03-21 Thread Karsten Blees
Am 20.03.2014 22:56, schrieb Stefan Zager: On Thu, Mar 20, 2014 at 2:35 PM, Karsten Blees karsten.bl...@gmail.com wrote: Am 20.03.2014 17:08, schrieb Stefan Zager: Going forward, there is still a lot of performance that gets left on the table when you rule out threaded file access

Re: Our official home page and logo for the Git project

2014-04-11 Thread Karsten Blees
Am 09.04.2014 18:43, schrieb Felipe Contreras: Junio C Hamano wrote: - To officially adopt the logo that appears on the project home page as our project logo. I have made my objections to that logo before, but here it goes again: bright red is a horrible color for a logo, as it only

Re: [RFC] Speed up git status by caching untracked file info

2014-04-22 Thread Karsten Blees
Am 17.04.2014 07:51, schrieb Nguyễn Thái Ngọc Duy: This patch serves as a heads up about a feature I'm working on. I hope that by posting it early, people could double check if I have made some fundamental mistakes that completely ruin the idea. It's about speeding up git status by caching

Re: [RFC] Speed up git status by caching untracked file info

2014-04-22 Thread Karsten Blees
Am 22.04.2014 12:35, schrieb Duy Nguyen: On Tue, Apr 22, 2014 at 5:13 PM, Duy Nguyen pclo...@gmail.com wrote: IIRC name_hash.c::lazy_init_name_hash took ~100ms on my system, so hopefully you did a dummy 'cache_name_exists(anything)' before starting the measurement of the first run? No I

Re: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c

2014-04-30 Thread Karsten Blees
Am 29.04.2014 11:12, schrieb Marat Radchenko: On MinGW, compat/mingw.h defines a 'mingw_main' wrapper function. Fix `warning: passing argument 2 of 'mingw_main' from incompatible pointer type` in http-fetch.c and remote-curl.c by dropping 'const'. Would you mind cross checking your changes

[RFC/PATCH v4 0/3] add performance tracing facility

2014-05-20 Thread Karsten Blees
This is the POSIX port of the patches I typically use to track down msysgit performance issues (thus v4, the latest windows-only version is here [1]). Sebastian and Dscho thought this might be useful in core git, so here it is. [1] https://github.com/msysgit/git/pull/46 Karsten Blees (3): add

[RFC/PATCH v4 2/3] add trace_performance facility to debug performance issues

2014-05-20 Thread Karsten Blees
): uint64_t t = 0; for (;;) { /* ignore */ t -= getnanotime(); /* code section to measure */ t += getnanotime(); /* ignore */ } trace_performance(t, frotz); Signed-off-by: Karsten Blees bl...@dcon.de --- cache.h | 18 ++ trace.c | 40

[RFC/PATCH v4 1/3] add high resolution timer function to debug performance issues

2014-05-20 Thread Karsten Blees
on the following platforms: * Linux: using clock_gettime(CLOCK_MONOTONIC) * Windows: using QueryPerformanceCounter() Todo: * enable clock_gettime() on more platforms * implement Mac OSX version using mach_absolute_time Signed-off-by: Karsten Blees bl...@dcon.de --- Makefile | 7

[RFC/PATCH v4 3/3] add command performance tracing to debug scripted commands

2014-05-20 Thread Karsten Blees
' '--get-color' '' 'reset' performance: at trace.c:319, time: 0.000908185 s: git command: 'git' 'rev-parse' '--verify' 'refs/stash' performance: at trace.c:319, time: 0.028827774 s: git command: 'git' 'stash' 'list' Signed-off-by: Karsten Blees bl...@dcon.de --- cache.h | 1 + git.c | 2

Re: [RFC/PATCH v4 1/3] add high resolution timer function to debug performance issues

2014-05-21 Thread Karsten Blees
Am 21.05.2014 09:31, schrieb Noel Grandin: On 2014-05-20 21:11, Karsten Blees wrote: * implement Mac OSX version using mach_absolute_time Note that unlike the Windows and Linux APIs, mach_absolute_time does not do correction for frequency-scaling I don't have a MAC so I can't test

Re: [RFC/PATCH v4 2/3] add trace_performance facility to debug performance issues

2014-05-21 Thread Karsten Blees
Am 21.05.2014 18:58, schrieb Jeff King: On Tue, May 20, 2014 at 09:11:19PM +0200, Karsten Blees wrote: Add trace_performance and trace_performance_since macros that print file name, line number, time and an optional printf-formatted text to the file specified in environment variable

Re: Git for Windows 1.9.4.msysgit.1

2014-08-15 Thread Karsten Blees
Am 15.08.2014 19:14, schrieb Thomas Braun: Hi, the Git for Windows team just released the second maintenance release of the Windows-specific installers for git 1.9.4. Thank you so much! Regressions git svn is/might be broken. Fixes welcome. rebase -b 0x6400

Re: Location of git config on Windows

2014-08-17 Thread Karsten Blees
Am 18.08.2014 00:01, schrieb Erik Faye-Lund: On Sun, Aug 17, 2014 at 10:18 PM, Daniel Corbe co...@corbe.net wrote: I installed git on my Windows machine while it was connected to my corporate network. It picked up on that fact and used a mapped drive to store its configuration file. As a

Re: [PATCH 8/9] autoconf: Check for timer_settime

2014-09-10 Thread Karsten Blees
Am 29.08.2014 19:40, schrieb Keller, Jacob E: On Fri, 2014-08-29 at 19:26 +0200, Johannes Sixt wrote: Am 29.08.2014 18:42, schrieb Jacob Keller: From: Jonas 'Sortie' Termansen sor...@maxsi.org This function will be used in a following commit. The timer_settime function is provided in librt

Re: Regression in e02ca72: git svn rebase is broken on Windows

2013-09-10 Thread Karsten Blees
Junio C Hamano gitster at pobox.com writes: Tvangeste i.4m.l33t at yandex.ru writes: Hi, After bisecting this problem I ended up with the mentioned commit that completely breaks git-svn for me on Windows (mingw/msys version). == # git svn rebase warning: unable to

[PATCH 0/3] Fix MSVC compile errors and cleanup stat definitions

2013-09-10 Thread Karsten Blees
A few minor fixes for the MSVC build. Also here: https://github.com/kblees/git/tree/kb/fix-msvc-stat-definitions Karsten Blees (3): MSVC: fix compile errors due to missing libintl.h MSVC: fix compile errors due to macro redefinitions MSVC: fix stat definition hell compat/mingw.h | 21

[PATCH 1/3] MSVC: fix compile errors due to missing libintl.h

2013-09-10 Thread Karsten Blees
Set NO_GETTEXT in config.mak.uname to get rid of libintl.h dependency. Signed-off-by: Karsten Blees bl...@dcon.de --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.uname index b27f51d..64b7f49 100644 --- a/config.mak.uname +++ b

[PATCH 2/3] MSVC: fix compile errors due to macro redefinitions

2013-09-10 Thread Karsten Blees
Skip errno.h definitions if they are already defined. Signed-off-by: Karsten Blees bl...@dcon.de --- compat/mingw.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/compat/mingw.h b/compat/mingw.h index bd0a88b..6b531e4 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -32,7 +32,9

[PATCH 3/3] MSVC: fix stat definition hell

2013-09-10 Thread Karsten Blees
of mingw_stat(). Signed-off-by: Karsten Blees bl...@dcon.de --- compat/mingw.h | 15 +++ compat/msvc.h | 15 --- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/compat/mingw.h b/compat/mingw.h index 6b531e4..3c3a9d9 100644 --- a/compat/mingw.h +++ b

[PATCH/RFC 0/5] New hash table implementation

2013-09-10 Thread Karsten Blees
yet, this is where remove() could come into play (to replace the CE_UNHASHED flag). Karsten Karsten Blees (5): add a hashtable implementation that supports O(1) removal buitin/describe.c: use new hash map implementation diffcore-rename.c: move code around to prepare for the next patch

[PATCH/RFC 1/5] add a hashtable implementation that supports O(1) removal

2013-09-10 Thread Karsten Blees
, average memory consumption is about 2/3 of hash.[ch], and insertion is about twice as fast due to less frequent resizing. Signed-off-by: Karsten Blees bl...@dcon.de --- Makefile | 3 + hashmap.c | 210 +++ hashmap.h | 200

[PATCH/RFC 2/5] buitin/describe.c: use new hash map implementation

2013-09-10 Thread Karsten Blees
Signed-off-by: Karsten Blees bl...@dcon.de --- builtin/describe.c | 53 - 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/builtin/describe.c b/builtin/describe.c index 7d73722..bbc7159 100644 --- a/builtin/describe.c +++ b

[PATCH/RFC 3/5] diffcore-rename.c: move code around to prepare for the next patch

2013-09-10 Thread Karsten Blees
No actual code changes, just move hash_filespec up and outdent part of find_identical_files. Signed-off-by: Karsten Blees bl...@dcon.de --- diffcore-rename.c | 98 +++ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/diffcore

[PATCH/RFC 4/5] diffcore-rename.c: simplify finding exact renames

2013-09-10 Thread Karsten Blees
. Signed-off-by: Karsten Blees bl...@dcon.de --- diffcore-rename.c | 75 +++ 1 file changed, 20 insertions(+), 55 deletions(-) diff --git a/diffcore-rename.c b/diffcore-rename.c index 008a60c..82b7975 100644 --- a/diffcore-rename.c +++ b/diffcore

[PATCH/RFC 5/5] diffcore-rename.c: use new hash map implementation

2013-09-10 Thread Karsten Blees
Signed-off-by: Karsten Blees bl...@dcon.de --- diffcore-rename.c | 48 +--- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/diffcore-rename.c b/diffcore-rename.c index 82b7975..6271af9 100644 --- a/diffcore-rename.c +++ b/diffcore

Re: [PATCH 1/2] relative_path should honor dos_drive_prefix

2013-09-12 Thread Karsten Blees
Am 12.09.2013 11:12, schrieb Jiang Xin: Tvangeste found that the relative_path function could not work properly on Windows if in and prefix have dos driver prefix. ($gmane/234434) e.g., When execute: test-path-utils relative_path C:/a/b D:/x/y, should return C:/a/b, but returns

Re: 1.8.3 - gitignore not being parsed correctly on OS X; regex support is broken?

2013-05-29 Thread Karsten Blees
Am 29.05.2013 06:19, schrieb Duy Nguyen: On Wed, May 29, 2013 at 10:41 AM, Duy Nguyen pclo...@gmail.com wrote: The changes in this area since 1.8.2.3 seem to be Karsten's (I'm not blaming, just wanted to narrow down the problem). The patterns of interest seem to be !/bin /bin/* !/bin/brew

[PATCH] dir.c: fix ignore processing within not-ignored directories

2013-05-29 Thread Karsten Blees
. the ignore pattern is not negated). Signed-off-by: Karsten Blees bl...@dcon.de --- Also available here: https://github.com/kblees/git/tree/kb/ignore-within-not-ignored-dir git pull git://github.com/kblees/git.git kb/ignore-within-not-ignored-dir dir.c | 3 +++ t

t0008-ignores failure (was: [msysGit] Git for Windows 1.8.3)

2013-05-29 Thread Karsten Blees
Am 25.05.2013 21:16, schrieb Pat Thoyts: On that note -- with this merge as it now stands I get the following test failures: t0008-ignores.sh 155, 158, 162, 164 These tests fail because they use absolute paths, e.g. C:/.../global-excludes, which is then translated to

Re: [PATCH] dir.c: fix ignore processing within not-ignored directories

2013-06-04 Thread Karsten Blees
Am 02.06.2013 21:25, schrieb Junio C Hamano: Duy Nguyen pclo...@gmail.com writes: + then + false + fi +' Nit pick, maybe this instead? test_must_fail grep ^one/a.1 output Neither. ! grep ^one/a.1 output Nice. I actually tried ! but without the

Re: Git status reports untracked on tracked files

2013-06-04 Thread Karsten Blees
core.ignorecase is in use. I fixed some cases with a commit that went into v1.7.8, but some problems remained. Karsten Blees (cc'd) did some work that went into git v1.8.1.6, but I do not know off-hand if it would fix your case or not. Yep, the hash collision bug can definitely cause

[PATCH] update-index/diff-index: use core.preloadindex to improve performance

2012-10-30 Thread karsten . blees
+ preloadindex | 9.157s |10.536s | 28.725s + this patch| 2.329s | 2.752s | 15.152s + fscache [1] | 0.731s | 1.171s | 8.877s [1] https://github.com/kblees/git/tree/kb/fscache-v3 Thanks-to: Albert Krawczyk pro-lo...@optusnet.com.au Signed-off-by: Karsten Blees bl...@dcon.de

Re: [PATCH] update-index/diff-index: use core.preloadindex to improve performance

2012-11-13 Thread karsten . blees
Jeff King p...@peff.net wrote on 02.11.2012 16:26:16: On Tue, Oct 30, 2012 at 10:50:42AM +0100, karsten.bl...@dcon.de wrote: 'update-index --refresh' and 'diff-index' (without --cached) don't honor the core.preloadindex setting yet. Porcelain commands using these (such as git [svn]

Re: [PATCH] update-index/diff-index: use core.preloadindex to improve performance

2012-11-13 Thread karsten . blees
Jeff King p...@peff.net wrote on 02.11.2012 16:38:00: On Fri, Nov 02, 2012 at 11:26:16AM -0400, Jeff King wrote: Still, I don't think we need to worry about performance regressions, because people who don't have a setup suitable for it will not turn on core.preloadindex in the first

Re: [PATCH] update-index/diff-index: use core.preloadindex to improve performance

2012-11-13 Thread Karsten Blees
Krawczyk pro-lo...@optusnet.com.au Signed-off-by: Karsten Blees bl...@dcon.de --- Can also be pulled from: https://github.com/kblees/git/tree/kb/update-diff-index-preload-upstream More performance figures (for msysgit) can be found in this discussion: https://github.com/pro-logic/git/commit/32c03dd8

[PATCH] wincred: improve compatibility with windows versions

2013-01-04 Thread Karsten Blees
to identify credentials for compatibility with Windows credential manager tools. Parse the protocol, username, host and path fields from the credential's target name instead. While we're at it, optionally accept CRLF (instead of LF only) to simplify debugging in bash / cmd. Signed-off-by: Karsten

Re: [PATCH] wincred: improve compatibility with windows versions

2013-01-08 Thread Karsten Blees
Am 04.01.2013 22:57, schrieb Erik Faye-Lund: On Fri, Jan 4, 2013 at 9:28 PM, Karsten Blees karsten.bl...@gmail.com wrote: On WinXP, the windows credential helper doesn't work at all (due to missing Cred[Un]PackAuthenticationBuffer APIs). On Win7, the credential format used by wincred

[PATCH v2 0/2] improve-wincred-compatibility

2013-01-10 Thread Karsten Blees
://github.com/kblees/git.git kb/improve-wincred-compatibility-v2 Karsten Blees (2): wincred: accept CRLF on stdin to simplify console usage wincred: improve compatibility with windows versions .../credential/wincred/git-credential-wincred.c| 206 - 1 file changed, 75

[PATCH v2 1/2] wincred: accept CRLF on stdin to simplify console usage

2013-01-10 Thread Karsten Blees
The windows credential helper currently only accepts LF on stdin, but bash and cmd.exe both send CRLF. This prevents interactive use in the console. Change the stdin parser to optionally accept CRLF. Signed-off-by: Karsten Blees bl...@dcon.de --- contrib/credential/wincred/git-credential

[PATCH v2 2/2] wincred: improve compatibility with windows versions

2013-01-10 Thread Karsten Blees
-by: Karsten Blees bl...@dcon.de --- .../credential/wincred/git-credential-wincred.c| 199 - 1 file changed, 70 insertions(+), 129 deletions(-) diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c index 94d7140

Re: inotify to minimize stat() calls

2013-02-12 Thread Karsten Blees
Am 11.02.2013 04:53, schrieb Duy Nguyen: On Sun, Feb 10, 2013 at 11:58 PM, Erik Faye-Lund kusmab...@gmail.com wrote: Karsten Blees has done something similar-ish on Windows, and he posted the results here: https://groups.google.com/forum/#!topic/msysgit/fL_jykUmUNE/discussion The new

Re: inotify to minimize stat() calls

2013-02-13 Thread Karsten Blees
Am 13.02.2013 19:18, schrieb Jeff King: Moreover, looking at it again, I don't think my patch produces the right behavior: we have a single dir_next pointer, even though the same ce_entry may appear under many directory hashes. So the cache_entries that has to dir/foo/ and those that hash to

Re: inotify to minimize stat() calls

2013-02-13 Thread Karsten Blees
Am 13.02.2013 23:55, schrieb Jeff King: On Wed, Feb 13, 2013 at 09:25:59PM +0100, Karsten Blees wrote: Alternatively, we could simply create normal cache_entries for the directories that are linked via ce-next, but have a trailing '/' in their name? Reference counting sounds good to me

Re: [PATCH] read_directory: avoid invoking exclude machinery on tracked files

2013-02-18 Thread Karsten Blees
Am 15.02.2013 20:32, schrieb Junio C Hamano: Duy Nguyen pclo...@gmail.com writes: On Fri, Feb 15, 2013 at 11:52 PM, Junio C Hamano gits...@pobox.com wrote: In the current code, we always check if a path is excluded, and when dealing with DT_REG/DT_LNK, we call treat_file(): * When such a

[PATCH/RFC] dir.c: Make git-status --ignored even more consistent

2013-02-25 Thread Karsten Blees
. In read_directory_recursive, pass along the check_only parameter when recursing into sub directories, so that we don't accidentally call dir_add_name in the check_only case. Signed-off-by: Karsten Blees bl...@dcon.de --- See also: https://github.com/kblees/git/commits/kb/git-status-ignored Revisiting

Re: [PATCH v2 0/2] improve-wincred-compatibility

2013-02-25 Thread Karsten Blees
Am 25.02.2013 07:43, schrieb Junio C Hamano: Erik Faye-Lund kusmab...@gmail.com writes: On Thu, Jan 10, 2013 at 1:10 PM, Karsten Blees karsten.bl...@gmail.com wrote: Changes since initial version (see attached diff for details): - split in two patches - removed unused variables

[PATCH] name-hash.c: fix endless loop with core.ignorecase=true

2013-02-27 Thread Karsten Blees
the parent directory first (instead of going through all directory levels for each file in the index). E.g. with WebKit (~200k files, ~7k dirs), time taken in lazy_init_name_hash is reduced from 176ms to 130ms. Signed-off-by: Karsten Blees bl...@dcon.de --- Also available here: https://github.com/kblees

Re: [PATCH] name-hash.c: fix endless loop with core.ignorecase=true

2013-02-27 Thread Karsten Blees
Am 27.02.2013 17:53, schrieb Junio C Hamano: Karsten Blees karsten.bl...@gmail.com writes: With core.ignorecase=true, name-hash.c builds a case insensitive index of all tracked directories. Currently, the existing cache entry structures are added multiple times to the same hashtable

[PATCH v2] name-hash.c: fix endless loop with core.ignorecase=true

2013-02-27 Thread Karsten Blees
is reduced from 176ms to 130ms. Signed-off-by: Karsten Blees bl...@dcon.de --- Also available here: https://github.com/kblees/git/tree/kb/name-hash-fix-endless-loop-v2 git pull git://github.com/kblees/git.git kb/name-hash-fix-endless-loop-v2 cache.h| 17 +--- name-hash.c

Re: [RFC/PATCH] Documentation/technical/api-fswatch.txt: start with outline

2013-03-12 Thread Karsten Blees
Am 10.03.2013 21:17, schrieb Ramkumar Ramachandra: git operations are slow on repositories with lots of files, and lots of tiny filesystem calls like lstat(), getdents(), open() are reposible for this. On the linux-2.6 repository, for instance, the numbers for git status look like this:

Re: [RFC/PATCH] Documentation/technical/api-fswatch.txt: start with outline

2013-03-13 Thread Karsten Blees
Am 13.03.2013 02:03, schrieb Duy Nguyen: On Wed, Mar 13, 2013 at 6:21 AM, Karsten Blees karsten.bl...@gmail.com wrote: Hmmm...I don't see how filesystem changes since last invocation can solve the problem, or am I missing something? I think what you mean to say is that the daemon should

[PATCH 0/8] Improve git-status --ignored

2013-03-18 Thread Karsten Blees
directories, to be consistent with the listing of untracked directories, and because ignored tracked contradicts the very definition of ignored content in gitignore(5). Cheers, Karsten Karsten Blees (8): dir.c: git-status --ignored: don't drop ignored directories dir.c: git-status --ignored: don't

[PATCH 1/8] dir.c: git-status --ignored: don't drop ignored directories

2013-03-18 Thread Karsten Blees
'git-status --ignored' drops ignored directories if they contain untracked files in an untracked sub directory. Fix it by getting exact (recursive) excluded status in treat_directory. Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 9 + t/t7061-wtstatus

[PATCH 2/8] dir.c: git-status --ignored: don't list files in ignored directories

2013-03-18 Thread Karsten Blees
'git-status --ignored' lists both the ignored directory and the ignored files if the files are in a tracked sub directory. When recursing into sub directories in read_directory_recursive, pass on the check_only parameter so that we don't accidentally add the files. Signed-off-by: Karsten Blees

[PATCH 3/8] dir.c: git-status --ignored: don't list empty ignored directories

2013-03-18 Thread Karsten Blees
'git-status --ignored' lists ignored tracked directories without any ignored files if a tracked file happens to match an exclude pattern. Always exclude tracked files. Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 11 --- t/t7061-wtstatus-ignore.sh | 24

[PATCH 6/8] dir.c: unify is_excluded and is_path_excluded APIs

2013-03-18 Thread Karsten Blees
Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 106 ++ dir.h | 6 ++-- 2 files changed, 45 insertions(+), 67 deletions(-) diff --git a/dir.c b/dir.c index 417feaa..16fee2c 100644 --- a/dir.c +++ b/dir.c @@ -710,10 +710,6

[PATCH 7/8] dir.c: replace is_path_excluded with now equivalent is_excluded API

2013-03-18 Thread Karsten Blees
Signed-off-by: Karsten Blees bl...@dcon.de --- builtin/add.c | 5 +--- builtin/check-ignore.c | 6 +--- builtin/ls-files.c | 15 +++--- dir.c | 79 -- dir.h | 16 ++ unpack-trees.c

[PATCH 8/8] dir.c: git-status: avoid is_excluded checks for tracked files

2013-03-18 Thread Karsten Blees
| 1.589 | 2.016 Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 38 +++--- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/dir.c b/dir.c index 086a169..c159000 100644 --- a/dir.c +++ b/dir.c @@ -1026,28 +1026,6 @@ static enum directory_treatment

[PATCH 4/8] dir.c: git-status --ignored: don't list empty directories as ignored

2013-03-18 Thread Karsten Blees
untracked files, as the directory may be empty. Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 17 - t/t7061-wtstatus-ignore.sh | 26 -- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/dir.c b/dir.c index fd1f088

Re: [PATCH 0/8] Improve git-status --ignored

2013-03-19 Thread Karsten Blees
Am 19.03.2013 06:20, schrieb Duy Nguyen: On Tue, Mar 19, 2013 at 11:08 AM, Junio C Hamano gits...@pobox.com wrote: Karsten Blees karsten.bl...@gmail.com writes: This patch series addresses several bugs and performance issues in .gitignore processing that came up in the inotify discussion

Re: [msysGit] Re: Re: File path not escaped in warning message

2012-08-06 Thread karsten . blees
Hi Janusz, It seems you're mixing up a few completely unrelated concepts here. Core.quotepath enables quoting and escaping of special characters in file names. This has nothing to do with character set encoding of file names (i.e. Cp1250/ISO-8859-2/UTF-8). AFAIK, apart from git-svn, git

Re: [msysGit] Script for handling UTF-16 files

2013-04-10 Thread Karsten Blees
Am 10.04.2013 01:47, schrieb Ken Ismert: I bumped into the UTF-16 display problem with Git Extensions running on top of msysGit. After lots of searching and experimenting, I came up with a solution that works for me. Note: Please see questions below. This method is for MSysGit 1.8.1,

[PATCH v2 00/14] Improve git-status --ignored

2013-04-15 Thread Karsten Blees
: git-status: avoid is_excluded checks for tracked files *-13: dir.c: git-status --ignored: don't scan the work tree three times - new optimization *-14: dir.c: git-status --ignored: don't scan the work tree twice - new optimization Karsten Blees (14): dir.c: git-status --ignored

[PATCH v2 01/14] dir.c: git-status --ignored: don't drop ignored directories

2013-04-15 Thread Karsten Blees
'git-status --ignored' drops ignored directories if they contain untracked files in an untracked sub directory. Fix it by getting exact (recursive) excluded status in treat_directory. Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 9 + t/t7061-wtstatus

[PATCH v2 02/14] dir.c: git-status --ignored: don't list files in ignored directories

2013-04-15 Thread Karsten Blees
'git-status --ignored' lists both the ignored directory and the ignored files if the files are in a tracked sub directory. When recursing into sub directories in read_directory_recursive, pass on the check_only parameter so that we don't accidentally add the files. Signed-off-by: Karsten Blees

[PATCH v2 03/14] dir.c: git-status --ignored: don't list empty ignored directories

2013-04-15 Thread Karsten Blees
'git-status --ignored' lists ignored tracked directories without any ignored files if a tracked file happens to match an exclude pattern. Always exclude tracked files. Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 11 --- t/t7061-wtstatus-ignore.sh | 24

[PATCH v2 04/14] dir.c: git-ls-files --directories: don't hide empty directories

2013-04-15 Thread Karsten Blees
'git-ls-files --ignored --directories' hides empty directories even though --no-empty-directory was not specified. Treat the DIR_HIDE_EMPTY_DIRECTORIES flag independently from DIR_SHOW_IGNORED to make all git-ls-files options work as expected. Signed-off-by: Karsten Blees bl...@dcon.de

[PATCH v2 05/14] dir.c: git-status --ignored: don't list empty directories as ignored

2013-04-15 Thread Karsten Blees
untracked files, as the directory may be empty. Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 5 +++-- t/t7061-wtstatus-ignore.sh | 26 -- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/dir.c b/dir.c index 1112b05..c5705e3

[PATCH v2 06/14] dir.c: make 'git-status --ignored' work within leading directories

2013-04-15 Thread Karsten Blees
aborting at the top level untracked directory. As a side effect, this also eliminates a recursive directory scan per leading directory level, as treat_directory() can no longer call read_directory_recursive() when called from treat_leading_path(). Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c

[PATCH v2 07/14] dir.c: git-clean -d -X: don't delete tracked directories

2013-04-15 Thread Karsten Blees
::treat_directory, remove the special handling of ignored tracked directories, so that the DIR_SHOW_OTHER_DIRECTORIES flag only affects other (i.e. untracked) directories. In dir.c::dir_add_name, check that added paths are untracked even if DIR_SHOW_IGNORED is set. Signed-off-by: Karsten Blees bl

[PATCH v2 08/14] dir.c: factor out parts of last_exclude_matching for later reuse

2013-04-15 Thread Karsten Blees
Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/dir.c b/dir.c index f10fb69..594307c 100644 --- a/dir.c +++ b/dir.c @@ -751,6 +751,26 @@ int is_excluded_from_list(const char *pathname

[PATCH v2 09/14] dir.c: move prep_exclude

2013-04-15 Thread Karsten Blees
Move prep_exclude in preparation for the next patch. Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 144 +- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/dir.c b/dir.c index 594307c..fcb3def 100644

[PATCH v2 10/14] dir.c: unify is_excluded and is_path_excluded APIs

2013-04-15 Thread Karsten Blees
Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 107 +++--- dir.h | 6 ++-- 2 files changed, 46 insertions(+), 67 deletions(-) diff --git a/dir.c b/dir.c index fcb3def..33bd019 100644 --- a/dir.c +++ b/dir.c @@ -710,10 +710,6

[PATCH v2 11/14] dir.c: replace is_path_excluded with now equivalent is_excluded API

2013-04-15 Thread Karsten Blees
Signed-off-by: Karsten Blees bl...@dcon.de --- builtin/add.c | 5 +--- builtin/check-ignore.c | 6 +--- builtin/ls-files.c | 15 +++--- dir.c | 79 -- dir.h | 16 ++ unpack-trees.c

[PATCH v2 12/14] dir.c: git-status: avoid is_excluded checks for tracked files

2013-04-15 Thread Karsten Blees
| 1.589 | 2.016 Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 38 +++--- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/dir.c b/dir.c index 67313bd..5ae5722 100644 --- a/dir.c +++ b/dir.c @@ -1023,28 +1023,6 @@ static enum directory_treatment

[PATCH v2 13/14] dir.c: git-status --ignored: don't scan the work tree three times

2013-04-15 Thread Karsten Blees
-directories. In the check_only case, abort when we've reached the most significant value (path_untracked). Signed-off-by: Karsten Blees bl...@dcon.de --- dir.c | 146 +- 1 file changed, 72 insertions(+), 74 deletions(-) diff --git

[PATCH v2 14/14] dir.c: git-status --ignored: don't scan the work tree twice

2013-04-15 Thread Karsten Blees
-status --ignored' is typically as fast as 'git-status'. Signed-off-by: Karsten Blees bl...@dcon.de --- Documentation/technical/api-directory-listing.txt | 25 --- builtin/check-ignore.c| 1 - dir.c | 10

Re: [PATCH v2 00/14] Improve git-status --ignored

2013-04-15 Thread Karsten Blees
Am 15.04.2013 21:33, schrieb Junio C Hamano: Junio C Hamano gits...@pobox.com writes: Karsten Blees karsten.bl...@gmail.com writes: This patch series addresses several bugs and performance issues in .gitignore processing. A 8-patch series ending at 5d765dc7888b (dir.c: git-status: avoid

Re: [PATCH v2 03/14] dir.c: git-status --ignored: don't list empty ignored directories

2013-04-16 Thread Karsten Blees
Am 16.04.2013 19:48, schrieb Ramkumar Ramachandra: Karsten Blees wrote: 'git-status --ignored' lists ignored tracked directories without any ignored files if a tracked file happens to match an exclude pattern. Here, I have: quux/ bar baz/ foo So, quux

Re: [PATCH v2 01/14] dir.c: git-status --ignored: don't drop ignored directories

2013-04-16 Thread Karsten Blees
know Junio doesn't like me mixing queries in reviews, but I don't fully agree with his policy. Karsten Blees wrote: 'git-status --ignored' drops ignored directories if they contain untracked files in an untracked sub directory. Wait, ignored directories will always contain untracked

Re: [PATCH v2 00/14] Improve git-status --ignored

2013-04-17 Thread Karsten Blees
Am 15.04.2013 22:25, schrieb Junio C Hamano: Karsten Blees karsten.bl...@gmail.com writes: Am 15.04.2013 21:33, schrieb Junio C Hamano: Junio C Hamano gits...@pobox.com writes: Karsten Blees karsten.bl...@gmail.com writes: This patch series addresses several bugs and performance issues

[PATCH v2-pu 11/14] dir.c: replace is_path_excluded with now equivalent is_excluded API

2013-04-17 Thread Karsten Blees
Signed-off-by: Karsten Blees bl...@dcon.de --- builtin/add.c | 5 +--- builtin/check-ignore.c | 16 -- builtin/ls-files.c | 15 +++--- dir.c | 79 -- dir.h | 16 ++ unpack-trees.c

[PATCH v2-pu 14/14] dir.c: git-status --ignored: don't scan the work tree twice

2013-04-17 Thread Karsten Blees
-status --ignored' is typically as fast as 'git-status'. Signed-off-by: Karsten Blees bl...@dcon.de --- Documentation/technical/api-directory-listing.txt | 25 --- builtin/check-ignore.c| 1 - dir.c | 10

  1   2   3   4   >