[PATCH v2 04/19] read-cache: Re-read index if index file changed

2013-07-12 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache.c | 91 +--- 1 file changed, 57 insertions(+), 34 deletions(-) diff --git a/read-cache.c b/read-cache.c index 1e7ffc2..3e3a0e2 100644 --- a/read-cache.c +++ b/read-cache.c

[PATCH v2 03/19] read-cache: move index v2 specific functions to their own file

2013-07-12 Thread Thomas Gummerer
Move index version 2 specific functions to their own file. The non-index specific functions will be in read-cache.c, while the index version 2 specific functions will be in read-cache-v2.c. Helped-by: Nguyen Thai Ngoc Duy pclo...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com

[PATCH v2 05/19] Add documentation for the index api

2013-07-12 Thread Thomas Gummerer
Add documentation for the index reading api. This also includes documentation for the new api functions introduced in the next patch. Helped-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Documentation/technical/api-in-core-index.txt | 54

[PATCH v2 06/19] read-cache: add index reading api

2013-07-12 Thread Thomas Gummerer
functions for iterating over and accessing cache entries. This simplifies future improvements to the in-memory format, as changes will be concentrated on one file, instead of the whole git source code. Helped-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com

[PATCH v2 07/19] make sure partially read index is not changed

2013-07-12 Thread Thomas Gummerer
part of the index file instead of re-reading it when changing it, gives a bit of a performance advantage, by avoiding to read parts of the index twice. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/update-index.c | 4 cache.h| 1 + read-cache-v2.c| 2

[PATCH v2 08/19] grep.c: Use index api

2013-07-12 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/grep.c | 71 ++ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index a419cda..8b02644 100644 --- a/builtin/grep.c +++ b/builtin

[PATCH v2 09/19] ls-files.c: use index api

2013-07-12 Thread Thomas Gummerer
Use the index api to read only part of the index, if the on-disk version of the index is index-v5. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/ls-files.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/builtin/ls-files.c b

[PATCH v2 11/19] read-cache: make in-memory format aware of stat_crc

2013-07-12 Thread Thomas Gummerer
Make the in-memory format aware of the stat_crc used by index-v5. It is simply ignored by index version prior to v5. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 1 + read-cache.c | 25 + 2 files changed, 26 insertions(+) diff --git a/cache.h b

[PATCH v2 10/19] documentation: add documentation of the index-v5 file format

2013-07-12 Thread Thomas Gummerer
robin.rosenb...@dewire.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Documentation/technical/index-file-format-v5.txt | 296 +++ 1 file changed, 296 insertions(+) create mode 100644 Documentation/technical/index-file-format-v5.txt diff --git a/Documentation

[PATCH v2 14/19] read-cache: read cache-tree in index-v5

2013-07-12 Thread Thomas Gummerer
is sorted lexically. So we have to rebuild this format from the on-disk directory list. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache-tree.c| 2 +- cache-tree.h| 6 read-cache-v5.c | 100 3 files changed, 107

[PATCH v2 13/19] read-cache: read resolve-undo data

2013-07-12 Thread Thomas Gummerer
-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/read-cache-v5.c b/read-cache-v5.c index 00112ea..853b97d 100644 --- a/read-cache-v5.c +++ b/read-cache

[PATCH v2 12/19] read-cache: read index-v5

2013-07-12 Thread Thomas Gummerer
...@gmail.com Helped-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Makefile| 1 + cache.h | 75 ++- read-cache-v5.c | 638 read-cache.h| 1 + 4 files changed, 714 insertions

[PATCH v2 16/19] read-cache: write index-v5 cache-tree data

2013-07-12 Thread Thomas Gummerer
Write the cache-tree data for the index version 5 file format. The in-memory cache-tree data is converted to the ondisk format, by adding it to the directory entries, that were compiled from the cache-entries in the step before. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache

[PATCH v2 18/19] update-index.c: rewrite index when index-version is given

2013-07-12 Thread Thomas Gummerer
Make update-index always rewrite the index when a index-version is given, even if the index already has the right version. This option is used for performance testing the writer and reader. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/update-index.c | 4 ++-- 1 file changed, 2

[PATCH v2 17/19] read-cache: write resolve-undo data for index-v5

2013-07-12 Thread Thomas Gummerer
-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c | 94 + 1 file changed, 94 insertions(+) diff --git a/read-cache-v5.c b/read-cache-v5.c index cd819b4..093ee1a 100644 --- a/read-cache-v5.c

[PATCH v2 15/19] read-cache: write index-v5

2013-07-12 Thread Thomas Gummerer
. Helped-by: Nguyen Thai Ngoc Duy pclo...@gmail.com Helped-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 8 + read-cache-v5.c | 594 +++- read-cache.c| 11 +- read-cache.h

[PATCH v2 19/19] p0003-index.sh: add perf test for the index formats

2013-07-12 Thread Thomas Gummerer
From: Thomas Rast tr...@inf.ethz.ch Add a performance test for index version [23]/4/5 by using git update-index --index-version=x, thus testing both the reader and the writer speed of all index formats. Signed-off-by: Thomas Rast tr...@inf.ethz.ch Signed-off-by: Thomas Gummerer t.gumme

Re: [PATCH 5.5/22] Add documentation for the index api

2013-07-11 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Wed, Jul 10, 2013 at 3:10 AM, Thomas Gummerer t.gumme...@gmail.com wrote: If you happen to know that certain entries match the given pathspec, you could help the caller avoid match_pathspec'ing again by set a bit in ce_flags. I currently don't know

Re: [PATCH 13/22] documentation: add documentation of the index-v5 file format

2013-07-11 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Sun, Jul 7, 2013 at 3:11 PM, Thomas Gummerer t.gumme...@gmail.com wrote: +== File entry (fileentries) + + File entries are sorted in ascending order on the name field, after the + respective offset given by the directory entries. All file names

Re: [PATCH 13/22] documentation: add documentation of the index-v5 file format

2013-07-11 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Thu, Jul 11, 2013 at 6:39 PM, Thomas Gummerer t.gumme...@gmail.com wrote: Question about the possibility of updating index file directly. If git updates a few fields of an entry (but not entrycrc yet) and crashes, the entry would become corrupt because

Re: [PATCH 5.5/22] Add documentation for the index api

2013-07-09 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Tue, Jul 9, 2013 at 3:54 AM, Thomas Gummerer t.gumme...@gmail.com wrote: As promised, a draft for a documentation for the index api as it is in this series. First of all, it may be a good idea to acknowledge index_state-cache[] as part of the API

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-09 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: The reader often needs to rewind the read-pointer partially while walking the index (e.g. next_cache_entry() in unpack-trees.c and how the o-cache_bottom position is used throughout the subsystem). I am

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Sun, Jul 7, 2013 at 3:11 PM, Thomas Gummerer t.gumme...@gmail.com wrote: +/* + * Options by which the index should be filtered when read partially. + * + * pathspec: The pathspec which the index entries have to match + * seen: Used to return the seen

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Sun, Jul 7, 2013 at 3:11 PM, Thomas Gummerer t.gumme...@gmail.com wrote: Add an api for access to the index file. Currently there is only a very basic api for accessing the index file, which only allows a full read of the index, and lets the users

Re: [PATCH 15/22] read-cache: read index-v5

2013-07-08 Thread Thomas Gummerer
Eric Sunshine sunsh...@sunshineco.com writes: On Sun, Jul 7, 2013 at 4:11 AM, Thomas Gummerer t.gumme...@gmail.com wrote: Make git read the index file version 5 without complaining. This version of the reader doesn't read neither the cache-tree nor the resolve undo data, but doesn't choke

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Mon, Jul 8, 2013 at 6:20 PM, Thomas Gummerer t.gumme...@gmail.com wrote: Duy Nguyen pclo...@gmail.com writes: Putting filter_opts in index_state feels like a bad design. Iterator information should be separated from the iterated object, so that two

Re: [PATCH 06/22] make sure partially read index is not changed

2013-07-08 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: A partially read index file currently cannot be written to disk. Make sure that never happens, by re-reading the index file if the index file wasn't read completely before changing the in-memory index. I

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: Add an api for access to the index file. Currently there is only a very basic api for accessing the index file, which only allows a full read of the index, and lets the users of the data filter

[PATCH 5.5/22] Add documentation for the index api

2013-07-08 Thread Thomas Gummerer
Document the new index api and add examples of how it should be used instead of the old functions directly accessing the index. Helped-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Duy Nguyen pclo...@gmail.com writes: Hmm.. I was confused

[PATCH 06/22] make sure partially read index is not changed

2013-07-07 Thread Thomas Gummerer
A partially read index file currently cannot be written to disk. Make sure that never happens, by re-reading the index file if the index file wasn't read completely before changing the in-memory index. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/update-index.c | 4

[PATCH 04/22] read-cache: Re-read index if index file changed

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache.c | 91 +--- 1 file changed, 57 insertions(+), 34 deletions(-) diff --git a/read-cache.c b/read-cache.c index 1e7ffc2..3e3a0e2 100644 --- a/read-cache.c +++ b/read-cache.c

[PATCH 01/22] t2104: Don't fail for index versions other than [23]

2013-07-07 Thread Thomas Gummerer
-worktree flags for the default index format is still covered by t7011 and t7012. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- t/t2104-update-index-skip-worktree.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t2104-update-index-skip-worktree.sh b/t/t2104-update-index-skip

[PATCH 00/22] Index v5

2013-07-07 Thread Thomas Gummerer
) 1.30(0.98+0.30) +8.3% 0003.10: v5: update-index missing 2.12(1.63+0.48) 0003.11: v5: grep nonexistent -- subdir missing 0.08(0.04+0.02) 0003.12: v5: ls-files -- subdir missing 0.07(0.05+0.01) Thomas Gummerer (21

[PATCH 02/22] read-cache: split index file version specific functionality

2013-07-07 Thread Thomas Gummerer
Split index file version specific functionality to their own functions, to prepare for moving the index file version specific parts to their own file. This makes it easier to add a new index file format later. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 5

[PATCH 05/22] read-cache: add index reading api

2013-07-07 Thread Thomas Gummerer
functions for iterating over and accessing cache entries. This simplifies future improvements to the in-memory format, as changes will be concentrated on one file, instead of the whole git source code. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 57

[PATCH 07/22] dir.c: use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- dir.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/dir.c b/dir.c index 897c874..f4919ba 100644 --- a/dir.c +++ b/dir.c @@ -468,19 +468,19 @@ void add_exclude(const char *string

[PATCH 08/22] tree.c: use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- tree.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/tree.c b/tree.c index 62fed63..5cd43f4 100644 --- a/tree.c +++ b/tree.c @@ -128,20 +128,28 @@ int read_tree_recursive(struct

[PATCH 10/22] grep.c: Use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/grep.c | 71 ++ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index a419cda..2a1c8f4 100644 --- a/builtin/grep.c +++ b/builtin

[PATCH 12/22] read-cache: make read_blob_data_from_index use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/read-cache.c b/read-cache.c index 4529fab..c81e643 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1588,29 +1588,27 @@ int

[PATCH 11/22] ls-files.c: use the index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/ls-files.c | 213 + 1 file changed, 100 insertions(+), 113 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 08d9786..82857d4 100644 --- a/builtin/ls-files.c

[PATCH 09/22] name-hash.c: use index api

2013-07-07 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- name-hash.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/name-hash.c b/name-hash.c index 617c86c..6551849 100644 --- a/name-hash.c +++ b/name-hash.c @@ -144,16 +144,19 @@ static void hash_index_entry(struct

[PATCH 16/22] read-cache: read resolve-undo data

2013-07-07 Thread Thomas Gummerer
-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/read-cache-v5.c b/read-cache-v5.c index e319f30..193970a 100644 --- a/read-cache-v5.c +++ b/read-cache

[PATCH 20/22] read-cache: write resolve-undo data for index-v5

2013-07-07 Thread Thomas Gummerer
-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c | 94 + 1 file changed, 94 insertions(+) diff --git a/read-cache-v5.c b/read-cache-v5.c index 306de30..412db53 100644 --- a/read-cache-v5.c

[PATCH 15/22] read-cache: read index-v5

2013-07-07 Thread Thomas Gummerer
...@gmail.com Helped-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Makefile| 1 + cache.h | 75 ++- read-cache-v5.c | 658 read-cache.h| 1 + 4 files changed, 734 insertions

[PATCH 17/22] read-cache: read cache-tree in index-v5

2013-07-07 Thread Thomas Gummerer
is sorted lexically. So we have to rebuild this format from the on-disk directory list. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache-tree.c| 2 +- cache-tree.h| 6 read-cache-v5.c | 100 3 files changed, 107

[PATCH 21/22] update-index.c: rewrite index when index-version is given

2013-07-07 Thread Thomas Gummerer
Make update-index always rewrite the index when a index-version is given, even if the index already has the right version. This option is used for performance testing the writer and reader. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/update-index.c | 4 ++-- 1 file changed, 2

[PATCH 03/22] read-cache: move index v2 specific functions to their own file

2013-07-07 Thread Thomas Gummerer
Move index version 2 specific functions to their own file. The non-index specific functions will be in read-cache.c, while the index version 2 specific functions will be in read-cache-v2.c. Helped-by: Nguyen Thai Ngoc Duy pclo...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com

[PATCH 19/22] read-cache: write index-v5 cache-tree data

2013-07-07 Thread Thomas Gummerer
Write the cache-tree data for the index version 5 file format. The in-memory cache-tree data is converted to the ondisk format, by adding it to the directory entries, that were compiled from the cache-entries in the step before. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache

[PATCH 18/22] read-cache: write index-v5

2013-07-07 Thread Thomas Gummerer
. Helped-by: Nguyen Thai Ngoc Duy pclo...@gmail.com Helped-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 8 + read-cache-v5.c | 594 +++- read-cache.c| 11 +- read-cache.h

[PATCH 13/22] documentation: add documentation of the index-v5 file format

2013-07-07 Thread Thomas Gummerer
robin.rosenb...@dewire.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Documentation/technical/index-file-format-v5.txt | 296 +++ 1 file changed, 296 insertions(+) create mode 100644 Documentation/technical/index-file-format-v5.txt diff --git a/Documentation

[PATCH 14/22] read-cache: make in-memory format aware of stat_crc

2013-07-07 Thread Thomas Gummerer
Make the in-memory format aware of the stat_crc used by index-v5. It is simply ignored by index version prior to v5. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 1 + read-cache.c | 25 + 2 files changed, 26 insertions(+) diff --git a/cache.h b

[PATCH 22/22] p0003-index.sh: add perf test for the index formats

2013-07-07 Thread Thomas Gummerer
From: Thomas Rast tr...@inf.ethz.ch Add a performance test for index version [23]/4/5 by using git update-index --index-version=x, thus testing both the reader and the writer speed of all index formats. Signed-off-by: Thomas Rast tr...@inf.ethz.ch Signed-off-by: Thomas Gummerer t.gumme

[PATCH] perf-lib: fix start/stop of perf tests

2013-06-29 Thread Thomas Gummerer
-by: Thomas Gummerer t.gumme...@gmail.com --- t/perf/perf-lib.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index a816fbc..c61d535 100644 --- a/t/perf/perf-lib.sh +++ b/t/perf/perf-lib.sh @@ -150,6 +150,7 @@ exit $ret' 3 24

Re: [PATCH] prompt: fix show upstream with svn and zsh

2013-05-22 Thread Thomas Gummerer
SZEDER Gábor sze...@ira.uka.de writes: Hi, On Tue, May 21, 2013 at 10:54:27PM +0200, Thomas Gummerer wrote: Currently the __git_ps1 git prompt gives the following error with a repository converted by git-svn, when used with zsh: __git_ps1_show_upstream:19: bad pattern: svn_remote

Re: [PATCH] prompt: fix show upstream with svn and zsh

2013-05-22 Thread Thomas Gummerer
Felipe Contreras felipe.contre...@gmail.com writes: On Tue, May 21, 2013 at 3:54 PM, Thomas Gummerer t.gumme...@gmail.com wrote: Currently the __git_ps1 git prompt gives the following error with a repository converted by git-svn, when used with zsh: __git_ps1_show_upstream:19: bad

[PATCH v2] prompt: fix show upstream with svn and zsh

2013-05-22 Thread Thomas Gummerer
-a var=(...) instead to make is compatible. This was introduced by 6d158cba (bash completion: Support divergence from upstream messages in __git_ps1), when the script was for bash only. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- contrib/completion/git-prompt.sh | 7 --- 1 file

Re: What's cooking in git.git (Sep 2012, #01; Tue, 4)

2012-09-07 Thread Thomas Gummerer
On 09/04, Junio C Hamano wrote: * tg/index-v5 (2012-08-17) 13 commits . p0002-index.sh: add perf test for the index formats . update-index.c: rewrite index when index-version is given . Write resolve-undo data for index-v5 . Write index-v5 cache-tree data . Write index-v5 . Read

Re: [PATCH] Prefix shell test output messages with test id

2012-09-06 Thread Thomas Gummerer
On 09/06, Jan-Marek Glogowski wrote: This adds the test ID (t) prefix to the test result message of all shell tests. This is especially useful when doing a parallel check run, where it's currently quite hard to identify the actual failing test case. Signed-off-by: Jan-Marek Glogowski

Re: [PATCH/RFC v4 02/13] read-cache.c: Re-read index if index file changed

2012-08-27 Thread Thomas Gummerer
On 08/25, Joachim Schmitz wrote: Thomas Gummerer t.gumme...@gmail.com schrieb im Newsbeitrag news:134529-6925-3-git-send-email-t.gumme...@gmail.com... [...] + usleep(10*1000); usleep() is not available to anybody, e.g. it is not in HP NonStop (not in every case at least

Re: read-cache-v5.c: compiler warnings

2012-08-20 Thread Thomas Gummerer
On 08/19, Ramsay Jones wrote: Hi Thomas, Just an FYI; two out of the three gcc compilers I use (Linux, cygwin but not MingW), issue the following warnings: CC read-cache-v5.o read-cache-v5.c: In function `write_index_v5': read-cache-v5.c:1011: warning: 'dir' might be used

[PATCH/RFC v4 02/13] read-cache.c: Re-read index if index file changed

2012-08-16 Thread Thomas Gummerer
Add the possibility of re-reading the index file, if it changed while reading. The index file might change during the read, causing outdated information to be displayed. We check if the index file changed by using its stat data as heuristic. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com

[PATCH/RFC v4 03/13] t2104: Don't fail for index versions other than [23]

2012-08-16 Thread Thomas Gummerer
-worktree flags for the default index format is still covered by t7011 and t7012. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- t/t2104-update-index-skip-worktree.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t2104-update-index-skip-worktree.sh b/t/t2104-update-index-skip

[PATCH/RFC v4 12/13] update-index.c: rewrite index when index-version is given

2012-08-16 Thread Thomas Gummerer
Make update-index always rewrite the index when a index-version is given, even if the index already has the right version. This option is used for performance testing the writer and reader. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/update-index.c | 4 +++- 1 file changed, 3

[PATCH/RFC v4 13/13] p0002-index.sh: add perf test for the index formats

2012-08-16 Thread Thomas Gummerer
From: Thomas Rast tr...@student.ethz.ch Add a performance test for index version [23]/4/5 by using git update-index --index-version=x, thus testing both the reader and the writer speed of all index formats. Signed-off-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme

[PATCH/RFC v4 11/13] Write resolve-undo data for index-v5

2012-08-16 Thread Thomas Gummerer
-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c | 96 + 1 file changed, 96 insertions(+) diff --git a/read-cache-v5.c b/read-cache-v5.c index d740d0b..ce2375a 100644 --- a/read-cache-v5.c

[PATCH/RFC v4 08/13] Read cache-tree in index-v5

2012-08-16 Thread Thomas Gummerer
is sorted lexically. So we have to rebuild this format from the on-disk directory list. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache-tree.c| 2 +- cache-tree.h| 6 read-cache-v5.c | 98 + 3 files changed, 105

[PATCH/RFC v4 10/13] Write index-v5 cache-tree data

2012-08-16 Thread Thomas Gummerer
Write the cache-tree data for the index version 5 file format. The in-memory cache-tree data is converted to the ondisk format, by adding it to the directory entries, that were compiled from the cache-entries in the step before. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache

[PATCH/RFC v4 07/13] Read resolve-undo data

2012-08-16 Thread Thomas Gummerer
-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/read-cache-v5.c b/read-cache-v5.c index 2031969..fb549de 100644 --- a/read-cache-v5.c +++ b/read-cache

[PATCH/RFC v4 06/13] Read index-v5

2012-08-16 Thread Thomas Gummerer
...@gmail.com Helped-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Makefile| 1 + cache.h | 73 read-cache-v5.c | 556 3 files changed, 630 insertions(+) create mode 100644

[PATCH/RFC v4 05/13] Make in-memory format aware of stat_crc

2012-08-16 Thread Thomas Gummerer
Make the in-memory format aware of the stat_crc used by index-v5. It is simply ignored by index version prior to v5. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 1 + read-cache.c | 25 + 2 files changed, 26 insertions(+) diff --git a/cache.h b

[PATCH/RFC v4 01/13] Move index v2 specific functions to their own file

2012-08-16 Thread Thomas Gummerer
...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Makefile | 2 + cache.h | 13 +- read-cache-v2.c | 581 read-cache.c | 612 +++ read-cache.h

[PATCH/RFC v4 04/13] Add documentation of the index-v5 file format

2012-08-16 Thread Thomas Gummerer
robin.rosenb...@dewire.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Documentation/technical/index-file-format-v5.txt | 296 +++ 1 file changed, 296 insertions(+) create mode 100644 Documentation/technical/index-file-format-v5.txt diff --git a/Documentation

Re: [PATCH/RFC v3 07/13] Read resolve-undo data

2012-08-10 Thread Thomas Gummerer
On 08/09, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: On 08/09, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: Make git read the resolve-undo data from the index. Since the resolve-undo data is joined with the conflicts in the ondisk

Re: [PATCH/RFC v3 01/13] Move index v2 specific functions to their own file

2012-08-10 Thread Thomas Gummerer
On 08/10, Junio C Hamano wrote: Thomas Rast tr...@student.ethz.ch writes: But I think the idea always was that any write that changes the basic layout of the file (so that you would read something wrong) will need a full rewrite. Otherwise we're too far in DB land. Most updates will

Re: [PATCH/RFC v2 06/16] t3700: sleep for 1 second, to avoid interfering with the racy code

2012-08-09 Thread Thomas Gummerer
On 08/08, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: So whether done with sleep or test-chmtime, avoiding a racily clean situation sounds like sweeping a bug in the v5 code in racy situation under the rug to me (unless I am misunderstanding what you are doing with

Re: [PATCH/RFC v2 06/16] t3700: sleep for 1 second, to avoid interfering with the racy code

2012-08-09 Thread Thomas Gummerer
On 08/09, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: On 08/08, Junio C Hamano wrote: ... Let me ask the same question in a more direct way. Which part of this test break with your series? test_expect_success 'git add --refresh with pathspec

Re: [PATCH/RFC v3 01/13] Move index v2 specific functions to their own file

2012-08-09 Thread Thomas Gummerer
On 08/09, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: /* remember to discard_cache() before reading a different cache! */ int read_index_from(struct index_state *istate, const char *path) { ... mmap = xmmap(NULL, mmap_size, PROT_READ | PROT_WRITE

Re: [PATCH/RFC v3 07/13] Read resolve-undo data

2012-08-09 Thread Thomas Gummerer
On 08/09, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: Make git read the resolve-undo data from the index. Since the resolve-undo data is joined with the conflicts in the ondisk format of the index file version 5, conflicts and resolved data is read at the same

Re: [PATCH/RFC v2 15/16] update-index.c: add a force-rewrite option

2012-08-08 Thread Thomas Gummerer
On 08/05, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: Add a force-rewrite option to update-index, which allows the user to rewrite the index, even if there are no changes. This can be used to do performance tests of both the reader and the writer. Signed-off

Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-08 Thread Thomas Gummerer
On 08/05, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: +static struct directory_entry *read_directories_v5(unsigned int *dir_offset, + unsigned int *dir_table_offset, + void *mmap

Re: [PATCH 2/2] Add index-v5

2012-08-08 Thread Thomas Gummerer
On 08/07, Robin Rosenberg wrote: Nguyễn Thái Ngọc Duy skrev 2012-08-06 16.36: +++ b/read-cache-v5.c @@ -0,0 +1,1170 @@ +#include cache.h +#include read-cache.h +#include resolve-undo.h +#include cache-tree.h + +struct cache_header_v5 { +unsigned int hdr_ndir; +unsigned int

[PATCH/RFC v3 05/13] Make in-memory format aware of stat_crc

2012-08-08 Thread Thomas Gummerer
Make the in-memory format aware of the stat_crc used by index-v5. It is simply ignored by index version prior to v5. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h |1 + read-cache.c | 25 + 2 files changed, 26 insertions(+) diff --git

[PATCH/RFC v3 02/13] t2104: Don't fail for index versions other than [23]

2012-08-08 Thread Thomas Gummerer
-worktree flags for the default index format is still covered by t7011 and t7012. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- t/t2104-update-index-skip-worktree.sh |1 + 1 file changed, 1 insertion(+) diff --git a/t/t2104-update-index-skip-worktree.sh b/t/t2104-update-index-skip

[PATCH/RFC v3 13/13] p0002-index.sh: add perf test for the index formats

2012-08-08 Thread Thomas Gummerer
From: Thomas Rast tr...@student.ethz.ch Add a performance test for index version [23]/4/5 by using git update-index --update-index=[345], thus testing both the reader and the writer speed of all index formats. Signed-off-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer

[PATCH/RFC v3 06/13] Read index-v5

2012-08-08 Thread Thomas Gummerer
...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Makefile|1 + cache.h | 72 +++ read-cache-v5.c | 589 +++ read-cache.c|1 - 4 files changed, 662 insertions(+), 1 deletion(-) create mode 100644 read

[PATCH/RFC v3 08/13] Read cache-tree in index-v5

2012-08-08 Thread Thomas Gummerer
is sorted lexically. So we have to rebuild this format from the on-disk directory list. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache-tree.c| 93 +++ cache-tree.h| 10 ++ read-cache-v5.c |1 + 3 files changed, 104

[PATCH/RFC v3 10/13] Write index-v5 cache-tree data

2012-08-08 Thread Thomas Gummerer
Write the cache-tree data for the index version 5 file format. The in-memory cache-tree data is converted to the ondisk format, by adding it to the directory entries, that were compiled from the cache-entries in the step before. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache

[PATCH/RFC v3 04/13] Add documentation of the index-v5 file format

2012-08-08 Thread Thomas Gummerer
robin.rosenb...@dewire.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Documentation/technical/index-file-format-v5.txt | 285 ++ 1 file changed, 285 insertions(+) create mode 100644 Documentation/technical/index-file-format-v5.txt diff --git a/Documentation

[PATCH/RFC v3 03/13] t3700: Avoid interfering with the racy code

2012-08-08 Thread Thomas Gummerer
interfering with the racy code, we use a time relative to the time returned by time(3), instead of a time relative to the mtime of the cache entries. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- t/t3700-add.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t3700-add.sh

[PATCH/RFC v3 01/13] Move index v2 specific functions to their own file

2012-08-08 Thread Thomas Gummerer
...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Makefile |2 + cache.h | 13 +- read-cache-v2.c | 581 +++ read-cache.c | 613 +++--- read-cache.h

[PATCH/RFC v3 07/13] Read resolve-undo data

2012-08-08 Thread Thomas Gummerer
-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c |1 + resolve-undo.c | 36 resolve-undo.h |2 ++ 3 files changed, 39 insertions(+) diff --git a/read-cache-v5.c b/read-cache-v5.c index ec1201d

[PATCH/RFC v3 11/13] Write resolve-undo data for index-v5

2012-08-08 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c |3 ++ resolve-undo.c | 93 +++ resolve-undo.h |1 + 3 files changed, 97 insertions(+) diff --git a/read-cache-v5.c b/read-cache-v5.c index 45f7acd..3d03111 100644

[PATCH/RFC v3 12/13] update-index.c: always rewrite the index when index-version is given

2012-08-08 Thread Thomas Gummerer
Make git update-index always rewrite the index, if a index-version is given. This is used for performance testing, to have a reader and writer for the whole index. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/update-index.c |4 +++- 1 file changed, 3 insertions(+), 1

[PATCH/RFC v3 09/13] Write index-v5

2012-08-08 Thread Thomas Gummerer
. Helped-by: Nguyen Thai Ngoc Duy pclo...@gmail.com Helped-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 10 +- read-cache-v5.c | 589 ++- read-cache.c| 19 +- read-cache.h

Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-08 Thread Thomas Gummerer
On 08/08, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: +name = (char *)mmap + *dir_offset; +beginning = mmap + *dir_table_offset; Notice how you computed name with pointer arithmetic by first casting mmap (which is void *) and when computing

Re: [PATCH/RFC v2 01/16] Modify cache_header to prepare for other index formats

2012-08-07 Thread Thomas Gummerer
On 08/05, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: diff --git a/read-cache.c b/read-cache.c index 2f8159f..5d61d92 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1433,7 +1446,7 @@ int read_index_from(struct index_state *istate, const char *path

Re: [PATCH/RFC v2 04/16] Modify write functions to prepare for other index formats

2012-08-07 Thread Thomas Gummerer
On 08/05, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: -static int ce_write(git_SHA_CTX *context, int fd, void *data, unsigned int len) +static int ce_write_v2(git_SHA_CTX *context, int fd, void *data, unsigned int len) { Mild NAK to name this function

Re: [PATCH/RFC v2 06/16] t3700: sleep for 1 second, to avoid interfering with the racy code

2012-08-07 Thread Thomas Gummerer
On 08/05, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: The new git racy code uses the mtime of cache-entries to smudge a racy clean entry, and loads the work, of checking the file-system -ECANTPARSE. The git racy code for index-v5 uses the mtime of the cache

Re: [PATCH/RFC v2 10/16] Read resolve-undo data

2012-08-07 Thread Thomas Gummerer
On 08/05, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: Make git read the resolve-undo data from the index. Since the resolve-undo data is joined with the conflicts in the ondisk format of the index file version 5, conflicts and resolved data is read at the same

Re: [PATCH/RFC v2 0/16] Introduce index file format version 5

2012-08-06 Thread Thomas Gummerer
On 08/06, Junio C Hamano wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: These mails are about cosmetics only. But I think it helps maintenance in long term. I notice in your series we have many functions with _v2 and _v5 mixed together. Worse, some functions that are _v2 only are

<    3   4   5   6   7   8   9   >