[PATCH v7 02/10] pkt-line: fix packet_read_line() to handle len < 0 errors

2017-05-05 Thread Ben Peart
Update packet_read_line() to test for len > 0 to avoid potential bug if read functions return lengths less than zero to indicate errors. Signed-off-by: Ben Peart <benpe...@microsoft.com> Found/Fixed-by: Lars Schneider <larsxschnei...@gmail.com> --- pkt-line.c | 2 +- 1 file chang

[PATCH v3 6/6] fsmonitor: add a sample query-fsmonitor hook script for Watchman

2017-05-25 Thread Ben Peart
-by: Ben Peart <benpe...@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de> --- templates/hooks--query-fsmonitor.sample | 37 + 1 file changed, 37 insertions(+) create mode 100644 templates/hooks--query-fsmonitor.sample

[PATCH v3 3/6] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-05-25 Thread Ben Peart
dirty is not checked as it cannot have any changes. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Makefile | 1 + builtin/update-index.c | 1 + cache.h| 5 ++ config.c | 5 ++ dir.c | 14 +++ dir.h

[PATCH v3 5/6] fsmonitor: add documentation for the fsmonitor extension.

2017-05-25 Thread Ben Peart
This includes the core.fsmonitor setting, the query-fsmonitor hook, and the fsmonitor index extension. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/config.txt | 7 +++ Documentation/githooks.txt | 23 +++ Documen

[PATCH v3 0/6] Fast git status via a file system watcher

2017-05-25 Thread Ben Peart
formatting and spelling errors - update code formatting based on feedback - rename fsmonitor_dirty_bitmap to fsmonitor_dirty Ben Peart (6): bswap: add 64 bit endianness helper get_be64 dir: make lookup_untracked() available outside of dir.c fsmonitor: teach git to optionally utilize a file

[PATCH v3 4/6] fsmonitor: add test cases for fsmonitor extension

2017-05-25 Thread Ben Peart
the extension and that we get the performance benefits desired. All test hooks output a marker file that is used to ensure the hook was actually used to generate the test results. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- t/t7519-status-fsmonitor.sh

[PATCH v3 1/6] bswap: add 64 bit endianness helper get_be64

2017-05-25 Thread Ben Peart
Add a new get_be64 macro to enable 64 bit endian conversions on memory that may or may not be aligned. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- compat/bswap.h | 4 1 file changed, 4 insertions(+) diff --git a/compat/bswap.h b/compat/bswap.h index d47c003544..f89fe7f4b5

[PATCH v3 2/6] dir: make lookup_untracked() available outside of dir.c

2017-05-25 Thread Ben Peart
Remove the static qualifier from lookup_untracked() and make it available to other modules by exporting it from dir.h. This will be used later when we need to find entries to mark 'fsmonitor dirty.' Signed-off-by: Ben Peart <benpe...@microsoft.com> --- dir.c | 2 +- dir.h | 3 +++ 2

Re: [PATCH v2 0/6] Fast git status via a file system watcher

2017-05-30 Thread Ben Peart
On 5/27/2017 2:57 AM, Christian Couder wrote: On Thu, May 25, 2017 at 3:55 PM, Ben Peart <peart...@gmail.com> wrote: On 5/24/2017 6:54 AM, Christian Couder wrote: Design ~~ A new git hook (query-fsmonitor) must exist and be enabled (core.fsmonitor=true) that takes a time_t for

Re: RFC: Would a config fetch.retryCount make sense?

2017-06-01 Thread Ben Peart
On 6/1/2017 8:48 AM, Lars Schneider wrote: Hi, we occasionally see "The remote end hung up unexpectedly" (pkt-line.c:265) on our `git fetch` calls (most noticeably in our automations). I expect random network glitches to be the cause. In some places we added a basic retry mechanism and I was

Re: [PATCH v2 0/6] Fast git status via a file system watcher

2017-05-31 Thread Ben Peart
On 5/31/2017 3:59 AM, Christian Couder wrote: On Thu, May 25, 2017 at 3:55 PM, Ben Peart <peart...@gmail.com> wrote: On 5/24/2017 6:54 AM, Christian Couder wrote: A new git hook (query-fsmonitor) must exist and be enabled (core.fsmonitor=true) that takes a time_t formatted as a

[PATCH v6 02/12] preload-index: add override to enable testing preload-index

2017-09-15 Thread Ben Peart
Preload index doesn't run unless it has a minimum number of 1000 files. To enable running tests with fewer files, add an environment variable (GIT_FORCE_PRELOAD_TEST) which will override that minimum and set it to 2. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- preload-index.c | 2

[PATCH v6 03/12] update-index: add a new --force-write-index option

2017-09-15 Thread Ben Peart
-index) to update-index that will ensure the index is written out even if the cache_changed flag is not set. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/update-index.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/update-index.c b/builtin/

[PATCH v6 01/12] bswap: add 64 bit endianness helper get_be64

2017-09-15 Thread Ben Peart
Add a new get_be64 macro to enable 64 bit endian conversions on memory that may or may not be aligned. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- compat/bswap.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/compat/bswap.h b/compat/bswap.h index 7d06

[PATCH v6 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-15 Thread Ben Peart
; when git updates a cache entry to match the current state on disk, it will now set the CE_FSMONITOR_VALID bit. Inversely, anytime git changes a cache entry, the CE_FSMONITOR_VALID bit is cleared and the corresponding untracked cache directory is marked invalid. Signed-off-by: Ben Peart <be

[PATCH v6 00/12] Fast git status via a file system watcher

2017-09-15 Thread Ben Peart
les. 'status -uno' may speed it up, but you have to be careful not to forget to add new files yourself (see 'git help status'). nothing to commit, working tree clean real1m22.774s user0m0.000s sys 0m0.000s Ben Peart (12): bswap: add 64 bit endianness helper get_be64 preload-index:

[PATCH v6 12/12] fsmonitor: add a performance test

2017-09-15 Thread Ben Peart
tests Signed-off-by: Ben Peart <benpe...@microsoft.com> Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Makefile| 1 + t/helper/.gitignore | 1 + t/helper/test-drop-caches.c | 161 ++ t/perf/p7519-fsmonito

[PATCH v6 11/12] fsmonitor: add a sample integration script for Watchman

2017-09-15 Thread Ben Peart
. Configure git to use the extension: git config core.fsmonitor .git/hooks/fsmonitor-watchman Optionally turn on the untracked cache for optimal performance. Signed-off-by: Ben Peart <benpe...@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de> Signed-

[PATCH v6 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-15 Thread Ben Peart
Add a test utility (test-dump-fsmonitor) that will dump the fsmonitor index extension. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Makefile | 1 + t/helper/test-dump-fsmonitor.c | 21 + 2 files changed, 22 insertions(+) create mode 10

[PATCH v6 09/12] split-index: disable the fsmonitor extension when running the split index test

2017-09-15 Thread Ben Peart
which causes the test to fail. The potential matrix of index extensions and index versions can is quite large so instead disable the extension before attempting to run the test. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- t/t1700-split-index.sh | 1 + 1 file changed, 1 insertion(+)

[PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-15 Thread Ben Peart
where it holds on to handles for directories and files which prevents the test directory from being cleaned up properly. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- t/t7519-status-fsmonitor.sh | 259 t/t7519/fsmonitor-all | 23 +

[PATCH v6 05/12] fsmonitor: add documentation for the fsmonitor extension.

2017-09-15 Thread Ben Peart
This includes the core.fsmonitor setting, the query-fsmonitor hook, and the fsmonitor index extension. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/config.txt | 6 ++ Documentation/githooks.txt | 23 +++ Documen

[PATCH v6 06/12] ls-files: Add support in ls-files to display the fsmonitor valid bit

2017-09-15 Thread Ben Peart
Add a new command line option (-f) to ls-files to have it use lowercase letters for 'fsmonitor valid' files Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/ls-files.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-f

[PATCH v6 07/12] update-index: add fsmonitor support to update-index

2017-09-15 Thread Ben Peart
Add support in update-index to manually add/remove the fsmonitor extension via --fsmonitor/--no-fsmonitor flags Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/update-index.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/builtin/update-index.c b/b

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-18 Thread Ben Peart
On 9/17/2017 12:47 AM, Junio C Hamano wrote: Ben Peart <benpe...@microsoft.com> writes: +write_integration_script() { + write_script .git/hooks/fsmonitor-test<<-\EOF + if [ "$#" -ne 2 ]; then + echo "$0: exactly 2 arguments expec

RE: [PATCH v6 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-18 Thread Ben Peart
> -Original Message- > From: Torsten Bögershausen [mailto:tbo...@web.de] > Sent: Monday, September 18, 2017 11:43 AM > To: Ben Peart <peart...@gmail.com>; Junio C Hamano > <gits...@pobox.com>; Ben Peart <ben.pe...@microsoft.com> > Cc: david.t

Re: [PATCH] test-drop-caches: mark file local symbols with static

2017-09-18 Thread Ben Peart
On 9/17/2017 12:14 PM, Ramsay Jones wrote: Signed-off-by: Ramsay Jones --- Hi Ben, If you need to re-roll your 'bp/fsmonitor' branch, could you please squash this into the relevant patch (commit c6b5a28941, "fsmonitor: add a performance test", 15-09-2017).

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-18 Thread Ben Peart
On 9/16/2017 11:27 AM, Torsten Bögershausen wrote: On 2017-09-15 21:20, Ben Peart wrote: +if [ "$1" != 1 ] +then + echo -e "Unsupported core.fsmonitor hook version.\n" >&2 + exit 1 +fi The echo -e not portable (It was detected by a tighter version of

Re: [PATCH v6 05/12] fsmonitor: add documentation for the fsmonitor extension.

2017-09-18 Thread Ben Peart
On 9/17/2017 4:03 AM, Junio C Hamano wrote: Ben Peart <benpe...@microsoft.com> writes: +[[fsmonitor-watchman]] +fsmonitor-watchman +~~~ I've queued a mini squash on top to make sure the line aligns with the length of the string above it by adding three ~'s here.

Re: [PATCH v6 05/12] fsmonitor: add documentation for the fsmonitor extension.

2017-09-18 Thread Ben Peart
On 9/15/2017 3:43 PM, David Turner wrote: -Original Message- From: Ben Peart [mailto:benpe...@microsoft.com] Sent: Friday, September 15, 2017 3:21 PM To: benpe...@microsoft.com Cc: David Turner <david.tur...@twosigma.com>; ava...@gmail.com; christian.cou...@gmail.co

Re: [PATCH v6 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-18 Thread Ben Peart
Thanks for taking the time to review/provide feedback! On 9/15/2017 5:35 PM, David Turner wrote: -Original Message- From: Ben Peart [mailto:benpe...@microsoft.com] Sent: Friday, September 15, 2017 3:21 PM To: benpe...@microsoft.com Cc: David Turner <david.tur...@twosigma.com>

Re: [PATCH v6 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-18 Thread Ben Peart
On 9/17/2017 4:02 AM, Junio C Hamano wrote: Ben Peart <benpe...@microsoft.com> writes: diff --git a/t/helper/test-dump-fsmonitor.c b/t/helper/test-dump-fsmonitor.c new file mode 100644 index 00..482d749bb9 --- /dev/null +++ b/t/helper/test-dump-fsmonitor.c @@ -0,0 +1,21 @@ +#i

Re: [PATCH v6 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-18 Thread Ben Peart
On 9/18/2017 9:32 AM, David Turner wrote: -Original Message- From: Ben Peart [mailto:peart...@gmail.com] Sent: Monday, September 18, 2017 9:07 AM To: David Turner <david.tur...@twosigma.com>; 'Ben Peart' <benpe...@microsoft.com> Cc: ava...@gmail.com; christian.cou...@gm

RE: [PATCH v6 12/12] fsmonitor: add a performance test

2017-09-18 Thread Ben Peart
> -Original Message- > From: Johannes Schindelin [mailto:johannes.schinde...@gmx.de] > Sent: Monday, September 18, 2017 10:25 AM > To: Ben Peart <ben.pe...@microsoft.com> > Cc: david.tur...@twosigma.com; ava...@gmail.com; > christian.cou...@gmail.com; g

[PATCH v7 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-19 Thread Ben Peart
where it holds on to handles for directories and files which prevents the test directory from being cleaned up properly. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- t/t7519-status-fsmonitor.sh | 304 t/t7519/fsmonitor-all | 24 +

[PATCH v7 09/12] split-index: disable the fsmonitor extension when running the split index test

2017-09-19 Thread Ben Peart
which causes the test to fail. The potential matrix of index extensions and index versions can is quite large so instead disable the extension before attempting to run the test. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- t/t1700-split-index.sh | 1 + 1 file changed, 1 insertion(+)

[PATCH v7 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-19 Thread Ben Peart
Add a test utility (test-dump-fsmonitor) that will dump the fsmonitor index extension. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Makefile | 1 + t/helper/test-dump-fsmonitor.c | 21 + 2 files changed, 22 insertions(+) create mode 10

[PATCH v7 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-19 Thread Ben Peart
; when git updates a cache entry to match the current state on disk, it will now set the CE_FSMONITOR_VALID bit. Inversely, anytime git changes a cache entry, the CE_FSMONITOR_VALID bit is cleared and the corresponding untracked cache directory is marked invalid. Signed-off-by: Ben Peart <be

[PATCH v7 01/12] bswap: add 64 bit endianness helper get_be64

2017-09-19 Thread Ben Peart
Add a new get_be64 macro to enable 64 bit endian conversions on memory that may or may not be aligned. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- compat/bswap.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/compat/bswap.h b/compat/bswap.h index 7d06

[PATCH v7 06/12] ls-files: Add support in ls-files to display the fsmonitor valid bit

2017-09-19 Thread Ben Peart
Add a new command line option (-f) to ls-files to have it use lowercase letters for 'fsmonitor valid' files Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/ls-files.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-f

RE: [PATCH v7 06/12] ls-files: Add support in ls-files to display the fsmonitor valid bit

2017-09-19 Thread Ben Peart
> -Original Message- > From: David Turner [mailto:david.tur...@twosigma.com] > Sent: Tuesday, September 19, 2017 5:27 PM > To: 'Ben Peart' <peart...@gmail.com>; Ben Peart > <ben.pe...@microsoft.com> > Cc: ava...@gmail.com; christian.cou...@gmail.co

Re: [PATCH v6 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-19 Thread Ben Peart
amp;& git add dir2/new && + git add dir3/new && git status >actual && git -c core.fsmonitor= status >expect && test_i18ncmp expect actua

Re: [PATCH v7 06/12] ls-files: Add support in ls-files to display the fsmonitor valid bit

2017-09-19 Thread Ben Peart
On 9/19/2017 3:46 PM, David Turner wrote: -Original Message- From: Ben Peart [mailto:benpe...@microsoft.com] Sent: Tuesday, September 19, 2017 3:28 PM To: benpe...@microsoft.com Cc: David Turner <david.tur...@twosigma.com>; ava...@gmail.com; christian.cou...@gmail.co

[PATCH v7 07/12] update-index: add fsmonitor support to update-index

2017-09-19 Thread Ben Peart
Add support in update-index to manually add/remove the fsmonitor extension via --[no-]fsmonitor flags. Add support in update-index to manually set/clear the fsmonitor valid bit via --[no-]fsmonitor-valid flags. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/update-index.

[PATCH v7 12/12] fsmonitor: add a performance test

2017-09-19 Thread Ben Peart
tests Signed-off-by: Ben Peart <benpe...@microsoft.com> Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Makefile| 1 + t/helper/.gitignore | 1 + t/helper/test-drop-caches.c | 162 ++ t/perf/p7519-fsmonito

[PATCH v7 00/12] Fast git status via a file system watcher

2017-09-19 Thread Ben Peart
"Watchman: $o->{error}.\n" . "Falling back to scanning...\n" if $o->{error}; - binmode STDOUT, ":utf8"; - local $, = "\0"; - print @{$o->{files}}; - open ($fh, ">", ".git/watchman-output.out"); print $

[PATCH v7 02/12] preload-index: add override to enable testing preload-index

2017-09-19 Thread Ben Peart
Preload index doesn't run unless it has a minimum number of 1000 files. To enable running tests with fewer files, add an environment variable (GIT_FORCE_PRELOAD_TEST) which will override that minimum and set it to 2. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- preload-index.c | 2

[PATCH v7 11/12] fsmonitor: add a sample integration script for Watchman

2017-09-19 Thread Ben Peart
. Configure git to use the extension: git config core.fsmonitor .git/hooks/fsmonitor-watchman Optionally turn on the untracked cache for optimal performance. Signed-off-by: Ben Peart <benpe...@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de> Signed-

[PATCH v7 03/12] update-index: add a new --force-write-index option

2017-09-19 Thread Ben Peart
-index) to update-index that will ensure the index is written out even if the cache_changed flag is not set. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/update-index.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/update-index.c b/builtin/

[PATCH v7 05/12] fsmonitor: add documentation for the fsmonitor extension.

2017-09-19 Thread Ben Peart
This includes the core.fsmonitor setting, the query-fsmonitor hook, and the fsmonitor index extension. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/config.txt | 7 + Documentation/git-ls-files.txt | 7 - Documentation/git-

RE: [PATCH v8 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-23 Thread Ben Peart
> -Original Message- > From: Martin Ågren [mailto:martin.ag...@gmail.com] > Sent: Friday, September 22, 2017 7:37 PM > To: Ben Peart <ben.pe...@microsoft.com> > Cc: David Turner <david.tur...@twosigma.com>; Ævar Arnfjörð Bjarmason > <ava...@gmail.com&

RE: [PATCH v8 01/12] bswap: add 64 bit endianness helper get_be64

2017-09-23 Thread Ben Peart
Thanks, Ben > -Original Message- > From: Martin Ågren [mailto:martin.ag...@gmail.com] > Sent: Friday, September 22, 2017 7:37 PM > To: Ben Peart <ben.pe...@microsoft.com> > Cc: David Turner <david.tur...@twosigma.com>; Ævar Arnfjörð Bjarmason > <av

Re: [PATCH v7 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-21 Thread Ben Peart
On 9/20/2017 10:24 PM, Ben Peart wrote: On 9/20/2017 10:00 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: Pretty much the same places you would also use CE_MATCH_IGNORE_VALID and CE_MATCH_IGNORE_SKIP_WORKTREE which serve the same role for those fe

Re: [PATCH v7 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-20 Thread Ben Peart
On 9/20/2017 2:23 AM, Junio C Hamano wrote: Ben Peart <benpe...@microsoft.com> writes: @@ -344,6 +346,7 @@ struct index_state { struct hashmap dir_hash; unsigned char sha1[20]; struct untracked_cache *untracked; + uint64_t fsmonitor_last_update; This

Re: [PATCH v6 09/12] split-index: disable the fsmonitor extension when running the split index test

2017-09-20 Thread Ben Peart
On 9/19/2017 4:43 PM, Jonathan Nieder wrote: Hi, Ben Peart wrote: The split index test t1700-split-index.sh has hard coded SHA values for the index. Currently it supports index V4 and V3 but assumes there are no index extensions loaded. When manually forcing the fsmonitor extension

Re: [PATCH v7 05/12] fsmonitor: add documentation for the fsmonitor extension.

2017-09-20 Thread Ben Peart
Thanks for the review. I'm not an English major so appreciate the feedback on my attempts to document the feature. On 9/20/2017 6:00 AM, Martin Ågren wrote: On 19 September 2017 at 21:27, Ben Peart <benpe...@microsoft.com> wrote: diff --git a/Documentation/git-update-index.

Re: [PATCH v7 03/12] update-index: add a new --force-write-index option

2017-09-20 Thread Ben Peart
On 9/20/2017 1:47 AM, Junio C Hamano wrote: Ben Peart <benpe...@microsoft.com> writes: + OPT_SET_INT(0, "force-write-index", _write, + N_("write out the index even if is not flagged as changed"), 1), Hmph. The only time thi

Re: [PATCH v6 09/12] split-index: disable the fsmonitor extension when running the split index test

2017-09-20 Thread Ben Peart
On 9/20/2017 1:46 PM, Jonathan Nieder wrote: Hi, Ben Peart wrote: On 9/19/2017 4:43 PM, Jonathan Nieder wrote: This feels to me like the wrong fix. Wouldn't it be better for the test not to depend on the precise object ids? See the "Tips for Writing Tests" section in t/R

Re: [PATCH v7 02/12] preload-index: add override to enable testing preload-index

2017-09-20 Thread Ben Peart
On 9/20/2017 6:06 PM, Stefan Beller wrote: On Tue, Sep 19, 2017 at 12:27 PM, Ben Peart <benpe...@microsoft.com> wrote: Preload index doesn't run unless it has a minimum number of 1000 files. To enable running tests with fewer files, add an environment variable (GIT_FORCE_PRELOAD_TEST)

Re: [PATCH v7 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-20 Thread Ben Peart
On 9/20/2017 10:00 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: Pretty much the same places you would also use CE_MATCH_IGNORE_VALID and CE_MATCH_IGNORE_SKIP_WORKTREE which serve the same role for those features. That is generally when you are about to overwrite d

Re: [PATCH v7 03/12] update-index: add a new --force-write-index option

2017-09-20 Thread Ben Peart
On 9/20/2017 9:46 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: Lets see how my ascii art skills do at describing this: Your ascii art is fine. If you said upfront that the capital letters signify points in time, lower letters are file-touching events, and time

[PATCH v8 00/12] Fast git status via a file system watcher

2017-09-22 Thread Ben Peart
if (lstat(old->name, ) || - ie_match_stat(o->src_index, old, , CE_MATCH_IGNORE_VALID|CE_MATCH_IGNORE_SKIP_WORKTREE|CE_MATCH_IGNORE_FSMONITOR)) + ie_match_stat(o->src_index, old, , CE_MATCH_IGNORE_VALID|CE_MATCH_IGNORE_SKIP_WORK

[PATCH v8 01/12] bswap: add 64 bit endianness helper get_be64

2017-09-22 Thread Ben Peart
Add a new get_be64 macro to enable 64 bit endian conversions on memory that may or may not be aligned. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- compat/bswap.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/compat/bswap.h b/compat/bswap.h index 7d06

[PATCH v8 02/12] preload-index: add override to enable testing preload-index

2017-09-22 Thread Ben Peart
existing tests and have the core.preloadindex code path execute as long as the test has at least 2 files by setting GIT_FORCE_PRELOAD_TEXT=1 before running the test. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- preload-index.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/p

[PATCH v8 07/12] update-index: add fsmonitor support to update-index

2017-09-22 Thread Ben Peart
Add support in update-index to manually add/remove the fsmonitor extension via --[no-]fsmonitor flags. Add support in update-index to manually set/clear the fsmonitor valid bit via --[no-]fsmonitor-valid flags. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/update-index.

[PATCH v8 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-22 Thread Ben Peart
Add a test utility (test-dump-fsmonitor) that will dump the fsmonitor index extension. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Makefile | 1 + t/helper/test-dump-fsmonitor.c | 21 + 2 files changed, 22 insertions(+) create mode 10

[PATCH v8 09/12] split-index: disable the fsmonitor extension when running the split index test

2017-09-22 Thread Ben Peart
which causes the test to fail. The potential matrix of index extensions and index versions can is quite large so instead temporarily disable the extension before attempting to run the test until the underlying problem of hard coded SHA values is fixed. Signed-off-by: Ben Peart <benpe...@microsoft.

[PATCH v8 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-22 Thread Ben Peart
; when git updates a cache entry to match the current state on disk, it will now set the CE_FSMONITOR_VALID bit. Inversely, anytime git changes a cache entry, the CE_FSMONITOR_VALID bit is cleared and the corresponding untracked cache directory is marked invalid. Signed-off-by: Ben Peart <be

[PATCH v8 06/12] ls-files: Add support in ls-files to display the fsmonitor valid bit

2017-09-22 Thread Ben Peart
Add a new command line option (-f) to ls-files to have it use lowercase letters for 'fsmonitor valid' files Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/ls-files.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-f

[PATCH v8 10/12] fsmonitor: add test cases for fsmonitor extension

2017-09-22 Thread Ben Peart
where it holds on to handles for directories and files which prevents the test directory from being cleaned up properly. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- t/t7519-status-fsmonitor.sh | 304 t/t7519/fsmonitor-all | 24 +

[PATCH v8 03/12] update-index: add a new --force-write-index option

2017-09-22 Thread Ben Peart
-index) to update-index that will ensure the index is written out even if the cache_changed flag is not set. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/update-index.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/update-index.c b/builtin/

[PATCH v8 12/12] fsmonitor: add a performance test

2017-09-22 Thread Ben Peart
. Signed-off-by: Ben Peart <benpe...@microsoft.com> Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@gmail.com> --- Makefile| 1 + t/helper/.gitignore | 1 + t/helper/test-drop-caches.c | 164 +++ t/perf/p7519-fsmonito

[PATCH v8 11/12] fsmonitor: add a sample integration script for Watchman

2017-09-22 Thread Ben Peart
. Configure git to use the extension: git config core.fsmonitor .git/hooks/fsmonitor-watchman Optionally turn on the untracked cache for optimal performance. Signed-off-by: Ben Peart <benpe...@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de> Signed-

[PATCH v8 05/12] fsmonitor: add documentation for the fsmonitor extension.

2017-09-22 Thread Ben Peart
This includes the core.fsmonitor setting, the fsmonitor integration hook, and the fsmonitor index extension. Also add documentation for the new fsmonitor options to ls-files and update-index. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/config.txt

RE: [PATCH v6 08/12] fsmonitor: add a test tool to dump the index extension

2017-09-19 Thread Ben Peart
> -Original Message- > From: Torsten Bögershausen [mailto:tbo...@web.de] > Sent: Tuesday, September 19, 2017 10:16 AM > To: Ben Peart <ben.pe...@microsoft.com> > Cc: Ben Peart <peart...@gmail.com>; Junio C Hamano > <gits...@pobox.com>; david.t

Re: [PATCH v7 04/12] fsmonitor: teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

2017-09-20 Thread Ben Peart
On 9/19/2017 10:28 PM, Junio C Hamano wrote: Ben Peart <benpe...@microsoft.com> writes: +/* do stat comparison even if CE_FSMONITOR_VALID is true */ +#define CE_MATCH_IGNORE_FSMONITOR 0X20 Hmm, when should a programmer use this flag? Pretty much the same places you would al

Re: [PATCH v8 00/12] Fast git status via a file system watcher

2017-10-04 Thread Ben Peart
On 10/3/2017 10:09 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: Well, rats. I found one more issue that applies to two of the commits. Can you squash this in as well or do you want it in some other form? Rats indeed. Let's go incremental as promised, perhap

Re: [PATCH v8 00/12] Fast git status via a file system watcher

2017-10-04 Thread Ben Peart
that is within my perl capabilities and is fixed with the following patch: -- >8 -- From 3e3b983a4208a62d166c233a7de3bf045322f6c7 Mon Sep 17 00:00:00 2001 From: Ben Peart <benpe...@microsoft.com> Date: Wed, 4 Oct 2017 08:33:39 -0400 Subject: [PATCH] fsmonitor: preserve utf8 filenames

Re: [PATCH v8 00/12] Fast git status via a file system watcher

2017-10-03 Thread Ben Peart
On 10/1/2017 4:24 AM, Junio C Hamano wrote: Ben Peart <ben.pe...@microsoft.com> writes: I had accumulated the same set of changes with one addition of removing a duplicate "the" from a comment in the fsmonitor.h file: diff --git a/fsmonitor.h b/fsmonitor.h index 8eb616

Re: [PATCH v2] sub-process: print the cmd when a capability is unsupported

2017-09-11 Thread Ben Peart
On 9/10/2017 11:27 PM, Junio C Hamano wrote: Junio C Hamano writes: I still think we would want to turn warning() to die(), but it probably is better to do so in a separate follow-up patch. That will give us a good place to record the reason why the current "just call a

Re: [PATCH v6 00/40] Add initial experimental external ODB support

2017-10-02 Thread Ben Peart
ith tests. - Patch 40/40 adds documentation about transfering objects and metadata when using the external odb mechanism. This patch is new since v5. Future work ~~~ There are still things that could be cleaned or improved. I think I may work on: - Integra

Re: [PATCH v6 09/40] Add initial external odb support

2017-10-02 Thread Ben Peart
On 9/29/2017 4:36 PM, Jonathan Tan wrote: On Wed, 27 Sep 2017 18:46:30 +0200 Christian Couder wrote: I am ok to split the patch series, but I am not sure that 01/40 to 09/40 is the right range for the first patch series. I would say that 01/40 to 07/40 is better

RE: [PATCH v8 00/12] Fast git status via a file system watcher

2017-09-29 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Thursday, September 28, 2017 10:21 PM > To: Ben Peart <ben.pe...@microsoft.com> > Cc: david.tur...@twosigma.com; ava...@gmail.com; > christian.cou...@gmail.com; git@vger.kernel.org; >

Re: [PATCH v5 35/40] Add Documentation/technical/external-odb.txt

2017-08-28 Thread Ben Peart
On 8/3/2017 5:19 AM, Christian Couder wrote: This describes the external odb mechanism's purpose and how it works. Helped-by: Ben Peart <benpe...@microsoft.com> Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/technical/external-o

Re: [PATCH 3/3] merge-recursive: change current file dir string_lists to hashmap

2017-08-28 Thread Ben Peart
On 8/28/2017 4:28 PM, Kevin Willford wrote: The code was using two string_lists, one for the directories and one for the files. The code never checks the lists independently so we should be able to only use one list. The string_list also is a O(log n) for lookup and insertion. Switching

Re: [PATCH 1/3] merge-recursive: fix memory leak

2017-08-28 Thread Ben Peart
On 8/28/2017 4:28 PM, Kevin Willford wrote: In merge_trees if process_renames or process_entry returns less than zero, the method will just return and not free re_merge, re_head, or entries. This change cleans up the allocated variables before returning to the caller. Signed-off-by: Kevin

Re: [PATCH 2/3] merge-recursive: remove return value from get_files_dirs

2017-08-28 Thread Ben Peart
On 8/28/2017 4:28 PM, Kevin Willford wrote: The return value of the get_files_dirs call is never being used. Looking at the history of the file and it was originally only being used for debug output statements. Also when read_tree_recursive return value is non zero it is changed to zero.

Re: [RFC PATCH] Updated "imported object" design

2017-08-17 Thread Ben Peart
On 8/15/2017 8:32 PM, Jonathan Tan wrote: This patch is based on an updated version of my refactoring of pack-related functions [1]. This corresponds to patch 1 of my previous series [2]. I'm sending this patch out (before I update the rest) for 2 reasons: * to provide a demonstration of

Re: [PATCH v5 35/40] Add Documentation/technical/external-odb.txt

2017-08-30 Thread Ben Peart
On 8/29/2017 11:43 AM, Christian Couder wrote: On Mon, Aug 28, 2017 at 8:59 PM, Ben Peart <peart...@gmail.com> wrote: On 8/3/2017 5:19 AM, Christian Couder wrote: +Helpers +=== + +ODB helpers are commands that have to be registered using either the +"odb..subprocessCommand&q

[PATCH v1] read_index_from(): Skip verification of the cache entry order to speed index loading

2017-10-18 Thread Ben Peart
1000 times 0.41(0.04+0.04) 0.50(0.00+0.10) +22.0% Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Notes: Base Ref: Web-Diff: https://github.com/benpeart/git/commit/54fa9cf954 Checkout: git fetch https://github.com/benpeart/git verify_ce_order-v1 && git checkout 54f

Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

2017-10-23 Thread Ben Peart
On 10/23/2017 5:57 AM, Johannes Schindelin wrote: Hi Peff, On Fri, 20 Oct 2017, Jeff King wrote: On Fri, Oct 20, 2017 at 03:16:20PM +0200, Johannes Schindelin wrote: void tweak_fsmonitor(struct index_state *istate) { + int i; + + if (istate->fsmonitor_dirty) { +

Re: [PATCH v1 1/4] fastindex: speed up index load through parallelization

2017-11-14 Thread Ben Peart
On 11/14/2017 8:12 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: I have no thoughts or plans for changes in the future of IEOT (which I plan to rename ITOC). At this point in time, I can't even imagine what else we'd want as the index only contains cache e

RE: [PATCH] p7519: improve check for prerequisite WATCHMAN

2017-12-18 Thread Ben Peart
> -Original Message- > From: René Scharfe [mailto:l@web.de] > Sent: Saturday, December 16, 2017 7:12 AM > To: Git List <git@vger.kernel.org> > Cc: Junio C Hamano <gits...@pobox.com>; Ben Peart > <ben.pe...@microsoft.com>; Ævar Arnfjörð Bjarmason &g

[PATCH v1] fsmonitor: simplify determining the git worktree under Windows

2017-11-10 Thread Ben Peart
. It also spawns multiple processes (uname and cygpath) which slows things down. Simplify and speed up the process of finding the git worktree when running on Windows by keeping it in perl and avoiding spawning helper processes. Signed-off-by: Ben Peart <benpe...@microsoft.com> Sign

Re: [PATCH v1 1/4] fastindex: speed up index load through parallelization

2017-11-13 Thread Ben Peart
On 11/9/2017 11:46 PM, Junio C Hamano wrote: Ben Peart <benpe...@microsoft.com> writes: To make this work for V4 indexes, when writing the index, it periodically "resets" the prefix-compression by encoding the current entry as if the path name for the previous entry is comp

Re: [PATCH 2/2] fsmonitor: Store fsmonitor bitmap before splitting index

2017-11-13 Thread Ben Peart
On 11/9/2017 2:58 PM, Alex Vandiver wrote: ba1b9caca6 resolved the problem of the fsmonitor data being applied to the non-base index when reading; however, a similar problem exists when writing the index. Specifically, writing of the fsmonitor extension happens only after the work to split

Re: [PATCH v1 1/4] fastindex: speed up index load through parallelization

2017-11-14 Thread Ben Peart
On 11/13/2017 8:10 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: The proposed format for extensions (ie having both a header and a footer with name and size) in the current patch already enables having multiple extensions that can be parsed forward or backward

Re: [PATCH v1 1/4] fastindex: speed up index load through parallelization

2017-11-14 Thread Ben Peart
On 11/14/2017 10:04 AM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: How about I add the logic to write out a special extension right before the SHA1 that contains an offset to the beginning of the extensions section. I will also add the logic in do_read_index() to

Re: [PATCH v1 1/4] fastindex: speed up index load through parallelization

2017-11-20 Thread Ben Peart
On 11/20/2017 6:51 PM, Ramsay Jones wrote: On 20/11/17 14:01, Ben Peart wrote: Further testing has revealed that switching from the regular heap to a refactored version of the mem_pool in fast-import.c produces similar gains as parallelizing do_index_load().  This appears to be a much

RE: What's cooking in git.git (Nov 2017, #05; Fri, 17)

2017-11-20 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Friday, November 17, 2017 1:35 AM > To: Ben Peart <ben.pe...@microsoft.com>; Alex Vandiver > <ale...@dropbox.com> > Cc: git@vger.kernel.org > Subject: Re: What's cooking i

<    1   2   3   4   5   6   7   >