[PATCH 2/3] test-lib: allow setting the index format version

2014-02-15 Thread Thomas Gummerer
version under which t2104 is run to 3. This test only tests functionality specific to version 2 and 3 of the index file and would fail if the test suite is run with any other version. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Makefile | 7 +++ t/t2104

[PATCH 1/3] introduce GIT_INDEX_VERSION environment variable

2014-02-15 Thread Thomas Gummerer
. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Documentation/git.txt | 5 + read-cache.c | 18 +- t/t1600-index.sh | 24 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100755 t/t1600-index.sh diff --git

[PATCH 3/3] read-cache: add index.version config variable

2014-02-15 Thread Thomas Gummerer
Add a config variable that allows setting the default index version when initializing a new index file. Similar to the GIT_INDEX_VERSION environment variable this only affects new index files. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Documentation/config.txt | 4 read

Re: [PATCH/WIP v2 02/14] read-cache: new extension to mark what file is watched

2014-01-17 Thread Thomas Gummerer
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: If an entry is watched, git lets an external program decide if the entry is modified or not. It's more like --assume-unchanged, but designed to be controlled by machine. We are running out of on-disk ce_flags, so instead of extending on-disk

Re: Subject: Something like cat-file for the index?

2014-01-10 Thread Thomas Gummerer
Hi, Enno Weichert enno.weich...@gmail.com writes: Hi, I'd like to have a more technical look into the index file and what/how it stores data; call it educational spelunking. I know the index-format.txt but I'd really like to save me the work to implement a pretty-printed output based on

[PATCH v2 1/2] diff: add test for --no-index executed outside repo

2013-12-16 Thread Thomas Gummerer
to guard against similar breakages in the future. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Perhaps use CEILING, like this (untested)? Thanks, this makes sense, here is the new version. t/t4053-diff-no-index.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/t/t4053

[PATCH v5 2/2] diff: don't read index when --no-index is given

2013-12-14 Thread Thomas Gummerer
add a test to guard against future breakages, and a performance test to show the improvements. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/diff.c| 5 +++-- t/perf/p4001-diff-no-index.sh | 22

[PATCH v5 1/2] diff: move no-index detection to builtin/diff.c

2013-12-14 Thread Thomas Gummerer
in the next patch. There are no functional changes. Helped-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Thanks Jonathan for reviewing the last round, this version addresses those comments, fixing the error message when git diff --no-index is run outside

[PATCH v4 2/2] diff: don't read index when --no-index is given

2013-12-11 Thread Thomas Gummerer
add a test to guard against future breakages, and a performance test to show the improvements. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/diff.c| 7 +-- t/perf/p4001-diff-no-index.sh | 22 ++ t/t4053-diff-no-index.sh | 15

[PATCH v4 1/2] diff: move no-index detection to builtin/diff.c

2013-12-11 Thread Thomas Gummerer
in the next patch. There are no functional changes. Helped-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Thanks to Jonathan for the suggestions in the previous round. Since the last roud I've made the no_index detection easier to read, and use two

[PATCH v3 1/2] diff: move no-index detection to builtin/diff.c

2013-12-10 Thread Thomas Gummerer
in the next patch. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Thanks to Junio, Torsten and Eric for comments on the previous round. I've added this refactoring patch, to avoid the partial duplication of the logic. I've also fixed the tests, that now use a sub-shell for executing and fix

Re: [PATCH v3 1/2] diff: move no-index detection to builtin/diff.c

2013-12-10 Thread Thomas Gummerer
Jonathan Nieder jrnie...@gmail.com writes: (pruning cc list) Hi, Thomas Gummerer wrote: Currently the --no-index option is parsed in diff_no_index(). Move the detection if a no-index diff should be executed to builtin/diff.c No functional change intended, I assume? Correct, I thought

Re: [PATCH v3 2/2] diff: don't read index when --no-index is given

2013-12-10 Thread Thomas Gummerer
Jonathan Nieder jrnie...@gmail.com writes: Thomas Gummerer wrote: --- a/builtin/diff.c +++ b/builtin/diff.c @@ -295,7 +295,9 @@ int cmd_diff(int argc, const char **argv, const char *prefix) break; } -prefix = setup_git_directory_gently(nongit

Re: [PATCH v4 00/24] Index-v5

2013-12-09 Thread Thomas Gummerer
Thomas Gummerer t.gumme...@gmail.com writes: Hi, previous rounds (without api) are at $gmane/202752, $gmane/202923, $gmane/203088 and $gmane/203517, the previous rounds with api were at $gmane/229732, $gmane/230210 and $gmane/232488. Thanks to Duy for reviewing the the last round and Junio

[PATCH] diff: don't read index when --no-index is given

2013-12-09 Thread Thomas Gummerer
option is given. Also add a test to guard against similar breakages in the future. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/diff.c | 13 +++-- t/t4053-diff-no-index.sh | 6 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/builtin/diff.c

Re: [PATCH] diff: don't read index when --no-index is given

2013-12-09 Thread Thomas Gummerer
Jonathan Nieder jrnie...@gmail.com writes: Thomas Gummerer wrote: git diff --no-index ... currently reads the index, during setup, when calling gitmodules_config(). In the usual case this gives us some performance drawbacks, Makes sense. but it's especially

[PATCH v2] diff: don't read index when --no-index is given

2013-12-09 Thread Thomas Gummerer
add a test to guard against future breakages, and a performance test to show the improvements. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Thanks to Jonathan and Jens for comments on the previous round. Changes: - Don't all setup_git_directory_gently when --no-index is given - Add

Re: [PATCH] diff: don't read index when --no-index is given

2013-12-09 Thread Thomas Gummerer
[Sorry for not seeing this before sending out v2.] Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: git diff --no-index ... currently reads the index, during setup, when calling gitmodules_config(). In the usual case this gives us some performance

Re: [PATCH v2] diff: don't read index when --no-index is given

2013-12-09 Thread Thomas Gummerer
Eric Sunshine sunsh...@sunshineco.com writes: On Mon, Dec 9, 2013 at 3:40 PM, Thomas Gummerer t.gumme...@gmail.com wrote: git diff --no-index ... currently reads the index, during setup, when calling gitmodules_config(). This results in worse performance when the index is not actually needed

Re: [PATCH v4 09/24] ls-files.c: use index api

2013-11-30 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Wed, Nov 27, 2013 at 7:00 PM, Thomas Gummerer t.gumme...@gmail.com wrote: @@ -447,6 +463,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix) struct dir_struct dir; struct exclude_list *el; struct

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Wed, Nov 27, 2013 at 7:00 PM, Thomas Gummerer t.gumme...@gmail.com wrote: --- a/cache.h +++ b/cache.h @@ -132,11 +141,17 @@ struct cache_entry { char name[FLEX_ARRAY]; /* more */ }; +#define CE_NAMEMASK (0x0fff) CE_NAMEMASK is redefined

Re: [PATCH v4 23/24] POC for partial writing

2013-11-30 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Wed, Nov 27, 2013 at 7:00 PM, Thomas Gummerer t.gumme...@gmail.com wrote: This makes update-index use both partial reading and partial writing. Partial reading is only used no option other than the paths is passed to the command. This passes the test

Re: [PATCH v4 09/24] ls-files.c: use index api

2013-11-30 Thread Thomas Gummerer
Antoine Pelisse apeli...@gmail.com writes: On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer t.gumme...@gmail.com wrote: @@ -447,6 +463,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix) struct dir_struct dir; struct exclude_list *el; struct

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Thomas Gummerer
Antoine Pelisse apeli...@gmail.com writes: On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer t.gumme...@gmail.com wrote: Make git read the index file version 5 without complaining. This version of the reader reads neither the cache-tree nor the resolve undo data, however, it won't choke

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Thomas Gummerer
Antoine Pelisse apeli...@gmail.com writes: On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer t.gumme...@gmail.com wrote: +static int verify_hdr(void *mmap, unsigned long size) +{ + uint32_t *filecrc; + unsigned int header_size; + struct cache_header *hdr; + struct

[PATCH v4 00/24] Index-v5

2013-11-27 Thread Thomas Gummerer
) - read-cache: clear version in discard_index() Typos fixed as suggested by Eric Sunshine Thomas Gummerer (22): read-cache: split index file version specific functionality read-cache: move index v2 specific functions to their own file read-cache: Re-read index if index file changed add

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

2013-11-27 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 v4 04/24] read-cache: Re-read index if index file changed

2013-11-27 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache.c | 65 +++- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/read-cache.c b/read-cache.c index e081084..51be1bb 100644 --- a/read-cache.c +++ b/read-cache.c

[PATCH v4 06/24] read-cache: add index reading api

2013-11-27 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 v4 08/24] grep.c: use index api

2013-11-27 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/grep.c | 69 +- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/builtin/grep.c b/builtin/grep.c index 63f8603..36c2bf0 100644 --- a/builtin/grep.c +++ b/builtin

[PATCH v4 05/24] add documentation for the index api

2013-11-27 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 | 56

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

2013-11-27 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 --- read-cache.c | 114

[PATCH v4 09/24] ls-files.c: use index api

2013-11-27 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- builtin/ls-files.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index e1cf6d8..22fb012 100644 --- a/builtin/ls-files.c +++ b/builtin/ls

[PATCH v4 10/24] documentation: add documentation of the index-v5 file format

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

[PATCH v4 07/24] make sure partially read index is not changed

2013-11-27 Thread Thomas Gummerer
the caller to load the right part of the index file, instead of re-reading it when changing it, gives a bit of a performance advantage by avoiding reading parts of the index twice. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache.c | 4 1 file changed, 4 insertions(+) diff

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

2013-11-27 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 v4 12/24] read-cache: read index-v5

2013-11-27 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 | 32 - read-cache-v5.c | 417 read-cache.h| 1 + 4 files changed, 450 insertions(+), 1

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

2013-11-27 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 v4 24/24] perf: add partial writing test

2013-11-27 Thread Thomas Gummerer
Add a test that uses update-index and exercises the partial writing code path. --- t/perf/p0003-index.sh | 33 + 1 file changed, 33 insertions(+) diff --git a/t/perf/p0003-index.sh b/t/perf/p0003-index.sh index 5360175..d1f590b 100755 --- a/t/perf/p0003-index.sh

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

2013-11-27 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 v4 20/24] introduce GIT_INDEX_VERSION environment variable

2013-11-27 Thread Thomas Gummerer
Respect a GIT_INDEX_VERSION environment variable, when a new index is initialized. Setting the environment variable will not cause existing index files to be converted to another format for additional safety. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Documentation/git.txt | 5

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

2013-11-27 Thread Thomas Gummerer
-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c | 199 +--- 1 file changed, 191 insertions(+), 8 deletions(-) diff --git a/read-cache-v5.c b/read-cache-v5.c index 0d06cfe..a5e9b5a 100644

[PATCH v4 14/24] read-cache: read cache-tree in index-v5

2013-11-27 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| 1 + read-cache-v5.c | 68 + 3 files changed, 70 insertions

[PATCH v4 23/24] POC for partial writing

2013-11-27 Thread Thomas Gummerer
This makes update-index use both partial reading and partial writing. Partial reading is only used no option other than the paths is passed to the command. This passes the test suite, but doesn't behave correctly when a write fails. A log should be written to the lock file, in order to be able

[PATCH v4 21/24] test-lib: allow setting the index format version

2013-11-27 Thread Thomas Gummerer
version 3). Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- Makefile| 7 +++ t/test-lib-functions.sh | 5 + t/test-lib.sh | 3 +++ 3 files changed, 15 insertions(+) diff --git a/Makefile b/Makefile index 6a1b054..8539548 100644 --- a/Makefile +++ b/Makefile

[PATCH v4 22/24] t1600: add index v5 specific tests

2013-11-27 Thread Thomas Gummerer
Add a test that tests only index v5 specific corner cases, to protect against breaking them in the future. Currently there is only one known case where the sorting is broken if the index is read filtered with two different length pathspecs. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com

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

2013-11-27 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 v4 13/24] read-cache: read resolve-undo data

2013-11-27 Thread Thomas Gummerer
-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache-v5.c | 160 ++-- 1 file changed, 157 insertions(+), 3 deletions(-) diff --git a/read-cache-v5.c b/read-cache-v5.c index 9d8c8f0..a9c687f 100644

[PATCH v4 16/24] read-cache: write index-v5 cache-tree data

2013-11-27 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 v4 15/24] read-cache: write index-v5

2013-11-27 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 | 1 + read-cache-v5.c | 431 +++- read-cache.c| 4 +- read-cache.h

Re: [PATCH v3 18/24] read-cache: write index-v5

2013-11-25 Thread Thomas Gummerer
[sorry about taking so much time to get back to you, was too busy with other stuff to work on git] Duy Nguyen pclo...@gmail.com writes: On Mon, Aug 19, 2013 at 2:42 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +char *super_directory(const char *filename) +{ + char *slash

Re: [PATCH v3 17/24] read-cache: read cache-tree in index-v5

2013-11-25 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Mon, Aug 19, 2013 at 2:42 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +/* + * This function modifies the directory argument that is given to it. + * Don't use it if the directory entries are still needed after. + */ There goes my hope of keeping

Re: GSoC 2014: Summary so far, discussion starter: how to improve?

2013-10-20 Thread Thomas Gummerer
As participant in GSoC 2012 I'll mostly respond to this from a student point of view. Generally I had a great learning experience with my project. It was a great introduction into how the Git project and open source projects in general work and certainly lowered the barrier to start

[PATCH v2 0/3] Add cleanup action to perf-lib

2013-09-23 Thread Thomas Gummerer
is the better option for them. The last patch adds a few simple tests to show the capabilities of the new --cleanup option. Junio C Hamano (1): test-lib: introduce modern style tests Thomas Gummerer (1): perf-lib: add cleanup option Thomas Rast (1): p0003-index.sh: add perf test

[PATCH v2 1/3] test-lib: introduce modern style tests

2013-09-23 Thread Thomas Gummerer
From: Junio C Hamano gits...@pobox.com Add a new, extensible style for tests that allows the addition of new parameters other than the prerequitites Signed-off-by: Junio C Hamano gits...@pobox.com Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- t/README| 24

[PATCH v2 2/3] perf-lib: add cleanup option

2013-09-23 Thread Thomas Gummerer
-by: Thomas Gummerer t.gumme...@gmail.com --- t/perf/README | 11 ++- t/perf/perf-lib.sh | 15 +++ t/test-lib-functions.sh | 6 ++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/t/perf/README b/t/perf/README index 21abbaf..73a1d1c 100644 --- a/t

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

2013-09-23 Thread Thomas Gummerer
From: Thomas Rast tr...@inf.ethz.ch Add a performance test for index version [23]/4 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 2/2] perf-lib: add test_perf_cleanup target

2013-09-20 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: When one performance test fails, the testing is aborted and the cleanup commands are not executed anymore, leaving the trash directory in the failed state. Ah

Re: [PATCH 2/2] perf-lib: add test_perf_cleanup target

2013-09-19 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: +For performance tests that need cleaning up after them that should not +be timed, use + +test_perf_cleanup 'descriptive string' ' +command1 +command2

[PATCH 1/2] perf-lib: split starting the test from the execution

2013-09-17 Thread Thomas Gummerer
Separate the execution part to make future changes to the tests simpler. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- t/perf/perf-lib.sh | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index c61d535..95e483c

[PATCH 2/2] perf-lib: add test_perf_cleanup target

2013-09-17 Thread Thomas Gummerer
Currently there is no way to clean up the changes that have been made with test_perf for the next run. Add a way to reset the repository to the state before the test for testing commands that modify the git repository, e.g. for perf testing git add. Signed-off-by: Thomas Gummerer t.gumme

[PATCH] contacts: allow execution from other directories

2013-09-17 Thread Thomas Gummerer
Currently git-contacts only works if it is executed from the top level of the git repository. Enable the execution in sub directories of that repository. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- I have no experience in perl, so there may be nicer implementations. It works when

Re: [PATCH v3 00/24] Index-v5

2013-08-30 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Duy Nguyen pclo...@gmail.com writes: On Mon, Aug 19, 2013 at 2:41 AM, Thomas Gummerer t.gumme...@gmail.com wrote: I'm done reviewing this version (I neglected the extension writing patches because after spending hours on the main write patch I

Re: [PATCH v3 10/24] make sure partially read index is not changed

2013-08-20 Thread Thomas Gummerer
Eric Sunshine sunsh...@sunshineco.com writes: On Sun, Aug 18, 2013 at 3:41 PM, Thomas Gummerer t.gumme...@gmail.com wrote: A partially read index file currently cannot be written to disk. Make sure that never happens, by erroring out when a caller tries to write a s/,// partially read

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

2013-08-20 Thread Thomas Gummerer
that in the re-roll. On Mon, Aug 19, 2013 at 2:42 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +static struct directory_entry *directory_entry_from_ondisk(struct ondisk_directory_entry *ondisk, + const char *name

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

2013-08-20 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Mon, Aug 19, 2013 at 2:42 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +static int read_entry(struct cache_entry **ce, char *pathname, size_t pathlen, + void *mmap, unsigned long mmap_size, + unsigned int

Re: [PATCH v3 02/24] read-cache: use fixed width integer types

2013-08-20 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: Use the fixed width integer types uint16_t and uint32_t for ondisk structures, because unsigned short and unsigned int do not hae a guaranteed size. This sounds like an independent fix to me. I'd queue

Re: [PATCH v3 04/24] read-cache: clear version in discard_index()

2013-08-20 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: All fields except index_state-version are reset in discard_index. Reset the version too. What is the practical consequence of not clearing this field? I somehow have a feeling that this was done

Re: [PATCH v3 23/24] introduce GIT_INDEX_VERSION environment variable

2013-08-20 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Mon, Aug 19, 2013 at 2:42 AM, Thomas Gummerer t.gumme...@gmail.com wrote: Respect a GIT_INDEX_VERSION environment variable, when a new index is initialized. Setting the environment variable will not cause existing index files to be converted to another

[PATCH v3 00/24] Index-v5

2013-08-18 Thread Thomas Gummerer
and ino on cygwin - introduce GIT_INDEX_VERSION environment variable - test-lib: allow setting the index format version Thomas Gummerer (23): t2104: Don't fail for index versions other than [23] read-cache: use fixed width integer types read-cache: split index file version specific

[PATCH v3 06/24] read-cache: Don't compare uid, gid and ino on cygwin

2013-08-18 Thread Thomas Gummerer
Cygwin doesn't have uid, gid and ino stats fields. Therefore we should never check them in the match_stat_data when working on the CYGWIN platform. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- This patch was not tested on Cygwin yet. I think it's needed though, because the re

[PATCH v3 05/24] read-cache: move index v2 specific functions to their own file

2013-08-18 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 v3 03/24] read-cache: split index file version specific functionality

2013-08-18 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 --- read-cache.c | 114

[PATCH v3 04/24] read-cache: clear version in discard_index()

2013-08-18 Thread Thomas Gummerer
All fields except index_state-version are reset in discard_index. Reset the version too. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/read-cache.c b/read-cache.c index de0bbcd..1e22f6f 100644 --- a/read-cache.c +++ b

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

2013-08-18 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 v3 02/24] read-cache: use fixed width integer types

2013-08-18 Thread Thomas Gummerer
Use the fixed width integer types uint16_t and uint32_t for ondisk structures, because unsigned short and unsigned int do not hae a guaranteed size. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- cache.h | 10 +- read-cache.c | 30 +++--- 2 files

[PATCH v3 23/24] introduce GIT_INDEX_VERSION environment variable

2013-08-18 Thread Thomas Gummerer
Respect a GIT_INDEX_VERSION environment variable, when a new index is initialized. Setting the environment variable will not cause existing index files to be converted to another format for additional safety. Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache.c | 9 +++-- 1

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

2013-08-18 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 | 2 + read-cache-v5.c | 596 +++- read-cache.c| 4 +- read-cache.h

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

2013-08-18 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 v3 10/24] make sure partially read index is not changed

2013-08-18 Thread Thomas Gummerer
. Forcing the caller to load the right 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 --- read-cache.c | 4 1 file changed, 4 insertions

[PATCH v3 07/24] read-cache: Re-read index if index file changed

2013-08-18 Thread Thomas Gummerer
Signed-off-by: Thomas Gummerer t.gumme...@gmail.com --- read-cache.c | 65 +++- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/read-cache.c b/read-cache.c index aa17ce7..2d12601 100644 --- a/read-cache.c +++ b/read-cache.c

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

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

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

2013-08-18 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 v3 15/24] read-cache: read index-v5

2013-08-18 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 | 32 +++- read-cache-v5.c | 473 read-cache.h| 1 + 4 files changed, 506 insertions(+), 1

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

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

[PATCH v3 08/24] add documentation for the index api

2013-08-18 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

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

2013-08-09 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Wed, Jul 17, 2013 at 3:11 PM, Thomas Gummerer t.gumme...@gmail.com wrote: Duy Nguyen pclo...@gmail.com writes: [..] +static int read_entries(struct index_state *istate, struct directory_entry **de, + unsigned int *entry_offset

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

2013-08-08 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Wed, Jul 17, 2013 at 3:11 PM, Thomas Gummerer t.gumme...@gmail.com wrote: Duy Nguyen pclo...@gmail.com writes: [..] +static int read_entries(struct index_state *istate, struct directory_entry **de, + unsigned int *entry_offset

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

2013-08-07 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: A little bit more.. On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +static void ce_queue_push(struct cache_entry **head, +struct cache_entry **tail, +struct

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

2013-07-19 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer t.gumme...@gmail.com wrote: @@ -489,8 +479,8 @@ extern void *read_blob_data_from_index(struct index_state *, const char *, unsig #define CE_MATCH_RACY_IS_DIRTY 02 /* do stat comparison even

Re: [PATCH v2 00/19] Index-v5

2013-07-19 Thread Thomas Gummerer
Junio C Hamano gits...@pobox.com writes: Thomas Gummerer t.gumme...@gmail.com writes: Ah ok, I understand. I think it's best to add a GIT_INDEX_VERSION=x config option to config.mak, where x is the index version that should be tested. Whatever you do, please do not call

Re: [PATCH v2 00/19] Index-v5

2013-07-17 Thread Thomas Gummerer
Ramsay Jones ram...@ramsay1.demon.co.uk writes: Thomas Gummerer wrote: Hi, previous rounds (without api) are at $gmane/202752, $gmane/202923, $gmane/203088 and $gmane/203517, the previous round with api was at $gmane/229732. Thanks to Junio, Duy and Eric for their comments on the previous

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

2013-07-17 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer t.gumme...@gmail.com wrote: + if (!with_tree) { + memset(opts, 0, sizeof(*opts)); + opts-pathspec = pathspec_struct; + opts-read_staged = 1

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

2013-07-17 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +== Directory offsets (diroffsets) + + diroffset (32-bits): offset to the directory relative to the beginning +of the index file. There are ndir + 1 offsets

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

2013-07-17 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: [..] +static int read_entries(struct index_state *istate, struct directory_entry **de, + unsigned int *entry_offset, void **mmap, + unsigned long mmap_size, unsigned int *nr, + unsigned

Re: [PATCH v2 00/19] Index-v5

2013-07-17 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Mon, Jul 15, 2013 at 4:30 PM, Thomas Gummerer t.gumme...@gmail.com wrote: Duy Nguyen pclo...@gmail.com writes: On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer t.gumme...@gmail.com wrote: t/perf/p0003-index.sh| 59

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

2013-07-17 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer t.gumme...@gmail.com wrote: A partially read index file currently cannot be written to disk. Make sure that never happens, by erroring out when a caller tries to change a partially read index

Re: [PATCH v2 00/19] Index-v5

2013-07-15 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer t.gumme...@gmail.com wrote: t/perf/p0003-index.sh| 59 + t/t2104-update-index-skip-worktree.sh|1 + For such a big code addition, the test part seems modest

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

2013-07-15 Thread Thomas Gummerer
Duy Nguyen pclo...@gmail.com writes: On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer t.gumme...@gmail.com wrote: +static int grep_cache(struct cache_entry *ce, void *cb_data) { - int hit = 0; - int nr; - read_cache(); + struct grep_opts *opts = cb_data

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

2013-07-12 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

<    2   3   4   5   6   7   8   9   >