[RFC] Speed up git status via a file system daemon

2016-07-13 Thread Ben Peart
Idea taken and code refactored from [1]: The intent of this patch series is to separate the index-helper logic from the Watchman logic. With very large repos, the percentage of time required to read the index from disk becomes a much smaller percentage of the overall time. The Watchman logic

Re: [PATCH v14 00/21] index-helper/watchman

2016-07-14 Thread Ben Peart
Duy Nguyen gmail.com> writes: > > On Wed, Jul 13, 2016 at 11:59 PM, David Turner novalis.org> wrote: > > On 07/12/2016 02:24 PM, Duy Nguyen wrote: > >> > >> Just thinking out loud. I've been thinking about this more about this. > >> After the move from signal-based to unix socket for

Re: Plugin mechanism(s) for Git?

2016-07-15 Thread Ben Peart
Lars Schneider gmail.com> writes: > > Thanks for this great summary of the problem, Christian! > > I think a generic plugin mechanism would be great but how would we do it? I’m also very glad to see the discussion about coming up with a good pattern for how git can interact with external

Re: Plugin mechanism(s) for Git?

2016-07-15 Thread Ben Peart
Jeff King peff.net> writes: > > On Fri, Jul 15, 2016 at 02:46:28PM +0200, Ævar Arnfjörð Bjarmason wrote: > > > On Fri, Jul 15, 2016 at 2:18 PM, Jeff King peff.net> wrote: > > > Some features, like the index-helper, aren't quite so easy. One reason > > > is that its data needs to persist as a

Re: [PATCH v13 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-07-06 Thread Ben Peart
Duy Nguyen gmail.com> writes: > > First step would be enabling that because besides directory > traversing, this code does a lot of string processing that's hopefully > eliminated by untracked cache extension. I cut git-status' time in > half with it. The side effect though, is that it creates

Re: [PATCH v13 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-06-30 Thread Ben Peart
David Turner novalis.org> writes: > > Hiding watchman behind index-helper means you need both daemons. You > can't run watchman alone. Not so good. But on the other hand, 'git' > binary is not linked to watchman/json libraries, which is good for > packaging. Core git package will run fine

Re: [PATCH v13 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-06-30 Thread Ben Peart
Duy Nguyen gmail.com> writes: > > On Thu, Jun 30, 2016 at 7:55 PM, Ben Peart gmail.com> wrote: > > David Turner novalis.org> writes: > > > >> > >> Hiding watchman behind index-helper means you need both daemons. You > >> can't run wa

RE: [RFC] Add support for downloading blobs on demand

2017-02-07 Thread Ben Peart
Facebook to share ideas. Ben > -Original Message- > From: Jakub Narębski [mailto:jna...@gmail.com] > Sent: Tuesday, February 7, 2017 4:57 PM > To: Ben Peart <peart...@gmail.com>; 'Christian Couder' > <christian.cou...@gmail.com> > Cc: 'Jeff King' <p...@peff

RE: [RFC] Add support for downloading blobs on demand

2017-02-07 Thread Ben Peart
No worries about a late response, I'm sure this is the start of a long conversation. :) > -Original Message- > From: Christian Couder [mailto:christian.cou...@gmail.com] > Sent: Sunday, February 5, 2017 9:04 AM > To: Ben Peart <peart...@gmail.com> > Cc: Jeff King

RE: [RFC] Add support for downloading blobs on demand

2017-02-23 Thread Ben Peart
awning a process on every call won't work. The background process with a versioned interface that allows you to negotiate capabilities should solve this problem. Ben > -----Original Message- > From: Ben Peart [mailto:peart...@gmail.com] > Sent: Tuesday, February 7, 2017 1:21 PM

RE: [RFC] Add support for downloading blobs on demand

2017-01-17 Thread Ben Peart
Thanks for the encouragement, support, and good ideas to look into. Ben > -Original Message- > From: Shawn Pearce [mailto:spea...@spearce.org] > Sent: Friday, January 13, 2017 4:07 PM > To: Ben Peart <peart...@gmail.com> > Cc: git <git@vger.kernel.org>; benpe

RE: [RFC] Add support for downloading blobs on demand

2017-01-17 Thread Ben Peart
> To: Ben Peart <peart...@gmail.com> > Cc: git@vger.kernel.org; Ben Peart <ben.pe...@microsoft.com> > Subject: Re: [RFC] Add support for downloading blobs on demand > > This is an issue I've thought a lot about. So apologies in advance that this > response turned out a

RE: [RFC] Add support for downloading blobs on demand

2017-01-18 Thread Ben Peart
@codeaurora.org> > Cc: Ben Peart <peart...@gmail.com>; Shawn Pearce > <spea...@spearce.org>; git <git@vger.kernel.org>; > benpe...@microsoft.com > Subject: Re: [RFC] Add support for downloading blobs on demand > > On Tue, Jan 17, 2017 at 2:05 PM, Martin Fick &

RE: [PATCH] Speed up sparse checkout when $GIT_DIR/info/sparse-checkout is unchanged

2016-08-24 Thread Ben Peart
I didn't apply the patch and test it out but from just a code review, the logic behind and the design of this patch makes sense and it's a relatively small patch for the gain. It's also a great example of the minimal amount of work required to add a new extension into the index. Thank you for

RE: [PATCH] checkout: eliminate unnecessary merge for trivial checkout

2016-09-09 Thread Ben Peart
> -Original Message- > From: Jeff King [mailto:p...@peff.net] > Sent: Thursday, September 8, 2016 5:38 PM > To: Junio C Hamano <gits...@pobox.com> > Cc: Ben Peart <peart...@gmail.com>; git@vger.kernel.org; > pclo...@gmail.com; =peart...@gmail.com; Ben P

[PATCH v2] checkout: eliminate unnecessary merge for trivial checkout

2016-09-09 Thread Ben Peart
rformance: 16.461547867 s: git command: 'c:\Users\benpeart\bin\git.exe' 'checkout' '-b' 's' Switched to a new branch 's' Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/checkout.c | 99 +++--- 1 file changed, 95 insertions

[PATCH] checkout: eliminate unnecessary merge for trivial checkout

2016-09-08 Thread Ben Peart
rformance: 16.461547867 s: git command: 'c:\Users\benpeart\bin\git.exe' 'checkout' '-b' 's' Switched to a new branch 's' Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/checkout.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git

RE: [PATCH v2] checkout: eliminate unnecessary merge for trivial checkout

2016-09-12 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Friday, September 9, 2016 5:55 PM > To: Ben Peart <peart...@gmail.com> > Cc: git@vger.kernel.org; pclo...@gmail.com; Ben Peart > <benpe...@microsoft.com> > Subject: R

[PATCH v3] checkout: eliminate unnecessary merge for trivial checkout

2016-09-13 Thread Ben Peart
rformance: 16.461547867 s: git command: 'c:\Users\benpeart\bin\git.exe' 'checkout' '-b' 's' Switched to a new branch 's' Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/checkout.c | 92 ++ 1 file changed, 92 insertions(+) di

RE: [PATCH v2] checkout: eliminate unnecessary merge for trivial checkout

2016-09-13 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Monday, September 12, 2016 4:32 PM > To: Ben Peart <peart...@gmail.com> > Cc: git@vger.kernel.org; pclo...@gmail.com; 'Ben Peart' > <benpe...@microsoft.com> > Subject: R

RE: [PATCH v3] checkout: eliminate unnecessary merge for trivial checkout

2016-09-19 Thread Ben Peart
ortcut only to avoid calling the separate "git branch foo" command and we should not think about the common perception and usage?   More comments inline...   > -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Tuesday, September 13, 2016 6:35 PM >

RE: [PATCH v3] checkout: eliminate unnecessary merge for trivial checkout

2016-09-21 Thread Ben Peart
g negative feedback about doing that than I am. :) How would you like to proceed? Ben -Original Message- From: Junio C Hamano [mailto:gits...@pobox.com] Sent: Monday, September 19, 2016 1:04 PM To: Ben Peart <peart...@gmail.com> Cc: pclo...@gmail.com; Ben Peart <ben.pe...@

RE: [PATCH v3] checkout: eliminate unnecessary merge for trivial checkout

2016-09-28 Thread Ben Peart
Resending > -Original Message- > From: git-ow...@vger.kernel.org [mailto:git-ow...@vger.kernel.org] On > Behalf Of Philip Oakley > Sent: Saturday, September 24, 2016 3:31 PM > To: Junio C Hamano <gits...@pobox.com> > Cc: Ben Peart <ben.pe...@microsoft.com

[RFC] Add support for downloading blobs on demand

2017-01-13 Thread Ben Peart
Goal To be able to better handle repos with many files that any individual developer doesn’t need it would be nice if clone/fetch only brought down those files that were actually needed. To enable that, we are proposing adding a flag to clone/fetch that will instruct the server to limit

[PATCH v1 3/3] convert: use new sub-process module for filter processes

2017-03-22 Thread Ben Peart
The filter..process code was refactored into a separate “sub-process” module to facilitate reuse in future patch series. This centralizes the logic in a single place to simplify maintenance. As a side benefit, it also improves the readability of convert.c. Signed-off-by: Ben Peart <be

[PATCH v1 2/3] sub-process: refactor the filter process code into a reusable module

2017-03-22 Thread Ben Peart
) based protocol. Full documentation is contained in Documentation/technical/api-sub-process.txt. This code is refactored from: Commit edcc85814c ("convert: add filter..process option", 2016-10-16) keeps the external process running and processes all commands Signed-off-by:

[PATCH v1 0/3] Add support for downloading blobs on demand

2017-03-22 Thread Ben Peart
ub-process” module so that we can centralize and reuse this logic in other areas. Once the code was refactored into sub-process, convert.c was updated to use the new module. Ben Peart (3): pkt-line: add packet_write_list_gently() sub-process: refactor the filter process code into a reusa

[PATCH v1 1/3] pkt-line: add packet_write_list_gently()

2017-03-22 Thread Ben Peart
Add packet_write_list_gently() which writes multiple lines in a single call and then calls packet_flush_gently(). This is used later in this patch series. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- pkt-line.c | 19 +++ pkt-line.h | 1 + 2 files changed, 20 inse

RE: [PATCH v1 1/3] pkt-line: add packet_write_list_gently()

2017-03-24 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Wednesday, March 22, 2017 4:21 PM > To: Ben Peart <peart...@gmail.com> > Cc: git@vger.kernel.org; Ben Peart <ben.pe...@microsoft.com>; > christian.cou...@gmail.com; larsxschnei...@g

RE: [PATCH v1 2/3] sub-process: refactor the filter process code into a reusable module

2017-03-24 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Thursday, March 23, 2017 2:17 AM > To: Ben Peart <peart...@gmail.com> > Cc: git@vger.kernel.org; Ben Peart <ben.pe...@microsoft.com>; > christian.cou...@gmail.com; larsxschnei...@g

RE: [PATCH v2 1/4] t7800: remove whitespace before redirect

2017-03-24 Thread Ben Peart
Please disregard. I apologize - somehow my format-patch/send-email went awry. Thanks, Ben > -Original Message- > From: Ben Peart [mailto:peart...@gmail.com] > Sent: Friday, March 24, 2017 11:27 AM > To: git@vger.kernel.org > Cc: Ben Peart <ben.pe...@microsoft.c

RE: [PATCH v3 0/8] refactor the filter process code into a reusable module

2017-03-30 Thread Ben Peart
> From: Junio C Hamano [mailto:gits...@pobox.com] > > Ben Peart <peart...@gmail.com> writes: > > > Ben Peart (8): > > pkt-line: add packet_writel() and packet_read_line_gently() > > convert: Update convert to use new packet_writel() function > >

RE: [PATCH v3 7/8] sub-process: move sub-process functions into separate files

2017-03-30 Thread Ben Peart
> From: Junio C Hamano [mailto:gits...@pobox.com] > > > diff --git a/sub-process.c b/sub-process.c new file mode 100644 index > > 00..2c4d27c193 > > --- /dev/null > > +++ b/sub-process.c > > @@ -0,0 +1,116 @@ > > +/* > > + * Generic implementation of background process infrastructure. > >

[PATCH v4 7/8] sub-process: move sub-process functions into separate files

2017-03-30 Thread Ben Peart
Move the sub-proces functions into sub-process.h/c. Add documentation for the new module in Documentation/technical/api-sub-process.txt Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/technical/api-sub-process.txt | 54 + Ma

[PATCH v4 8/8] convert: Update subprocess_read_status to not die on EOF

2017-03-30 Thread Ben Peart
Enable sub-processes to gracefully handle when the process dies by updating subprocess_read_status to return an error on EOF instead of dying. Update apply_multi_file_filter to take advantage of the revised subprocess_read_status. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- con

RE: [PATCH v2 1/2] pkt-line: add packet_writel() and packet_read_line_gently()

2017-03-30 Thread Ben Peart
> From: Torsten Bögershausen [mailto:tbo...@web.de] > > > Does this work ? > I would have expected > packet_writel(fd, "line one", "line two", "line n"), NULL; > No, that's actually not valid C syntax. > > > > which requires the use of variable number of arguments. With your > proposal that

[PATCH v4 1/8] pkt-line: add packet_read_line_gently()

2017-03-30 Thread Ben Peart
Add packet_read_line_gently() to enable reading a line without dying on EOF. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- pkt-line.c | 12 pkt-line.h | 10 ++ 2 files changed, 22 insertions(+) diff --git a/pkt-line.c b/pkt-line.c index d4b6bfe076..58842544b4

[PATCH v4 5/8] convert: Update generic functions to only use generic data structures

2017-03-30 Thread Ben Peart
Update all functions that are going to be moved into a reusable module so that they only work with the reusable data structures. Move code that is specific to the filter out into the filter specific functions. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.

[PATCH v4 3/8] convert: Split start_multi_file_filter into two separate functions

2017-03-30 Thread Ben Peart
specific initialization function that will negotiate the multi-file-filter interface version and capabilities. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 63 ++- 1 file changed, 38 insertions(+), 25 deletions(-)

[PATCH v4 4/8] convert: Separate generic structures and variables from the filter specific ones

2017-03-30 Thread Ben Peart
into the generic functions. cmd2process is a filter protocol specific structure that is used to track the negotiated capabilities of the filter. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 57 +++-- 1 file changed, 31 inse

[PATCH v4 2/8] convert: move packet_write_list() into pkt-line as packet_writel()

2017-03-30 Thread Ben Peart
Add packet_writel() which writes multiple lines in a single call and then calls packet_flush_gently(). Update convert.c to use the new packet_writel() function from pkt-line. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 23 ++- pkt-line.

[PATCH v4 6/8] convert: rename reusable sub-process functions

2017-03-30 Thread Ben Peart
Do a mechanical rename of the functions that will become the reusable sub-process module. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 47 --- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/convert.c b/con

[PATCH v4 0/8] refactor the filter process code into a reusable module

2017-03-30 Thread Ben Peart
l commands Ben Peart (8): pkt-line: add packet_read_line_gently() convert: move packet_write_list() into pkt-line as packet_writel() convert: Split start_multi_file_filter into two separate functions convert: Separate generic structures and variables from the filter specific ones conve

[PATCH v4 2/8] convert: move packet_write_list() into pkt-line as packet_writel()

2017-03-30 Thread Ben Peart
Add packet_writel() which writes multiple lines in a single call and then calls packet_flush_gently(). Update convert.c to use the new packet_writel() function from pkt-line. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 23 ++- pkt-line.

[PATCH v3 4/8] convert: Separate generic structures and variables from the filter specific ones

2017-03-29 Thread Ben Peart
into the generic functions. cmd2process is a filter protocol specific structure that is used to track the negotiated capabilities of the filter. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 57 +++-- 1 file changed, 31 inse

[PATCH v3 2/8] convert: Update convert to use new packet_writel() function

2017-03-29 Thread Ben Peart
convert.c had it's own packet_write_list() function that can now be replaced with the new packet_writel() function from pkt-line. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/con

[PATCH v3 6/8] convert: rename reusable sub-process functions

2017-03-29 Thread Ben Peart
Do a mechanical rename of the functions that will become the reusable sub-process module. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/convert.c b/con

[PATCH v3 3/8] convert: Split start_multi_file_filter into two separate functions

2017-03-29 Thread Ben Peart
specific initialization function that will negotiate the multi-file-filter interface version and capabilities. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 63 ++- 1 file changed, 38 insertions(+), 25 deletions(-)

[PATCH v3 5/8] convert: Update generic functions to only use generic data structures

2017-03-29 Thread Ben Peart
Update all functions that are going to be moved into a reusable module so that they only work with the reusable data structures. Move code that is specific to the filter out into the filter functions. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.

[PATCH v3 7/8] sub-process: move sub-process functions into separate files

2017-03-29 Thread Ben Peart
Move the sub-proces functions into sub-process.h/c. Add documentation for the new module in Documentation/technical/api-sub-process.txt Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/technical/api-sub-process.txt | 54 + Ma

[PATCH v3 8/8] convert: Update subprocess_read_status to not die on EOF

2017-03-29 Thread Ben Peart
Enable sub-processes to gracefully handle when the process dies by updating subprocess_read_status to return an error on EOF instead of dying. Update apply_multi_file_filter to take advantage of the revised subprocess_read_status. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- con

[PATCH v3 1/8] pkt-line: add packet_writel() and packet_read_line_gently()

2017-03-29 Thread Ben Peart
Add packet_writel() which writes multiple lines in a single call and then calls packet_flush_gently(). Add packet_read_line_gently() to enable reading a line without dying on EOF. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- pkt-line.c | 31 +++ pkt-

[PATCH v3 0/8] refactor the filter process code into a reusable module

2017-03-29 Thread Ben Peart
l commands Ben Peart (8): pkt-line: add packet_writel() and packet_read_line_gently() convert: Update convert to use new packet_writel() function convert: Split start_multi_file_filter into two separate functions convert: Separate generic structures and variables from the filter spe

[PATCH v3 0/8] refactor the filter process code into a reusable module

2017-03-29 Thread Ben Peart
l commands Ben Peart (8): pkt-line: add packet_writel() and packet_read_line_gently() convert: Update convert to use new packet_writel() function convert: Split start_multi_file_filter into two separate functions convert: Separate generic structures and variables from the filter spe

RE: [PATCH v2 1/2] pkt-line: add packet_writel() and packet_read_line_gently()

2017-03-27 Thread Ben Peart
> -Original Message- > From: Torsten Bögershausen [mailto:tbo...@web.de] > Sent: Saturday, March 25, 2017 1:47 AM > To: Ben Peart <peart...@gmail.com>; git@vger.kernel.org > Cc: Ben Peart <ben.pe...@microsoft.com>; christian.cou...@gmail.com; > larsxsch

RE: [PATCH v1 2/3] sub-process: refactor the filter process code into a reusable module

2017-03-27 Thread Ben Peart
> Junio C Hamano writes: > > > To avoid confusion (although readers may not require), even though I > explained "boring mechanical part" first and "refactoring", that was purely > for explanation. > > In practice, I would expect that it would be easier to both do and review

RE: [PATCH v2 2/2] sub-process: refactor the filter process code into a reusable module

2017-03-27 Thread Ben Peart
> -Original Message- > From: Jonathan Tan [mailto:jonathanta...@google.com] > Sent: Monday, March 27, 2017 3:00 PM > To: Ben Peart <peart...@gmail.com>; git@vger.kernel.org > Cc: Ben Peart <ben.pe...@microsoft.com> > Subject: Re: [PATCH v2 2/2] sub-process: re

[PATCH v2 0/2] Refactor the filter process code into a reusable module

2017-03-24 Thread Ben Peart
uot;sub-process" module so that we can centralize and reuse this logic in other areas. Ben Peart (2): pkt-line: add packet_writel() and packet_read_line_gently() sub-process: refactor the filter process code into a reusable module Documentation/technical/api-sub-process.txt | 54

[PATCH v2 1/4] t7800: remove whitespace before redirect

2017-03-24 Thread Ben Peart
From: David Aguilar <dav...@gmail.com> Signed-off-by: David Aguilar <dav...@gmail.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Ben Peart <benpe...@microsoft.com> --- t/t7800-difftool.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH v2 3/4] difftool: handle modified symlinks in dir-diff mode

2017-03-24 Thread Ben Peart
d from the worktree. Helped-by: Johannes Schindelin <johannes.schinde...@gmx.de> Signed-off-by: David Aguilar <dav...@gmail.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Ben Peart <benpe...@microsoft.com> --- builtin/difftool.c | 51

[PATCH v2 2/2] sub-process: refactor the filter process code into a reusable module

2017-03-24 Thread Ben Peart
l commands Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/technical/api-sub-process.txt | 54 ++ Makefile| 1 + convert.c | 160 ++-- sub-process.c

[PATCH v2 1/2] pkt-line: add packet_writel() and packet_read_line_gently()

2017-03-24 Thread Ben Peart
Add packet_writel() which writes multiple lines in a single call and then calls packet_flush_gently(). Add packet_read_line_gently() to enable reading a line without dying on EOF. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- pkt-line.c | 31 +++ pkt-

[PATCH v2 2/4] t7800: cleanup cruft left behind by tests

2017-03-24 Thread Ben Peart
From: David Aguilar <dav...@gmail.com> Signed-off-by: David Aguilar <dav...@gmail.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Ben Peart <benpe...@microsoft.com> --- t/t7800-difftool.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(

[PATCH v2 4/4] Git 2.12.1

2017-03-24 Thread Ben Peart
From: Junio C Hamano <gits...@pobox.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/git.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git.txt b/Documenta

Safe to use stdatomic.h?

2017-03-20 Thread Ben Peart
My college Jeff is working on a patch series to further parallelize the loading of the index. As part of that patch, it would be nice to use the atomic_fetch_add function as that would be more efficient than creating a mutex simply to protect a variable so that it can be incremented. I haven't

[PATCH v5 1/8] pkt-line: add packet_read_line_gently()

2017-04-07 Thread Ben Peart
Add packet_read_line_gently() to enable reading a line without dying on EOF. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- pkt-line.c | 12 pkt-line.h | 10 ++ 2 files changed, 22 insertions(+) diff --git a/pkt-line.c b/pkt-line.c index d4b6bfe076..58842544b4

[PATCH v5 4/8] convert: Separate generic structures and variables from the filter specific ones

2017-04-07 Thread Ben Peart
into the generic functions. cmd2process is a filter protocol specific structure that is used to track the negotiated capabilities of the filter. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 57 +++-- 1 file changed, 31 inse

[PATCH v5 8/8] convert: Update subprocess_read_status to not die on EOF

2017-04-07 Thread Ben Peart
Enable sub-processes to gracefully handle when the process dies by updating subprocess_read_status to return an error on EOF instead of dying. Update apply_multi_file_filter to take advantage of the revised subprocess_read_status. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- con

[PATCH v5 6/8] convert: rename reusable sub-process functions

2017-04-07 Thread Ben Peart
Do a mechanical rename of the functions that will become the reusable sub-process module. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 53 +++-- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/conve

[PATCH v5 7/8] sub-process: move sub-process functions into separate files

2017-04-07 Thread Ben Peart
Move the sub-proces functions into sub-process.h/c. Add documentation for the new module in Documentation/technical/api-sub-process.txt Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/technical/api-sub-process.txt | 54 + Ma

[PATCH v5 5/8] convert: Update generic functions to only use generic data structures

2017-04-07 Thread Ben Peart
Update all functions that are going to be moved into a reusable module so that they only work with the reusable data structures. Move code that is specific to the filter out into the filter specific functions. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.

[PATCH v5 2/8] convert: move packet_write_list() into pkt-line as packet_writel()

2017-04-07 Thread Ben Peart
Add packet_writel() which writes multiple lines in a single call and then calls packet_flush_gently(). Update convert.c to use the new packet_writel() function from pkt-line. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 23 ++- pkt-line.

[PATCH v5 0/8] refactor the filter process code into a reusable module

2017-04-07 Thread Ben Peart
("convert: add filter..process option", 2016-10-16) keeps the external process running and processes all commands Ben Peart (8): pkt-line: add packet_read_line_gently() convert: move packet_write_list() into pkt-line as packet_writel() convert: Split start_multi_file_filt

[PATCH v5 3/8] convert: Split start_multi_file_filter into two separate functions

2017-04-07 Thread Ben Peart
specific initialization function that will negotiate the multi-file-filter interface version and capabilities. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 63 ++- 1 file changed, 38 insertions(+), 25 deletions(-)

Re: [PATCH v5 4/8] convert: Separate generic structures and variables from the filter specific ones

2017-04-20 Thread Ben Peart
On 4/18/2017 9:23 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: On 4/16/2017 11:31 PM, Junio C Hamano wrote: Lars Schneider <larsxschnei...@gmail.com> writes: However, I think it eases code maintainability in the long run if a function is "as pure as po

Re: [PATCH v5 3/8] convert: Split start_multi_file_filter into two separate functions

2017-04-20 Thread Ben Peart
On 4/11/2017 4:05 PM, Jeff King wrote: On Tue, Apr 11, 2017 at 10:01:02PM +0200, Lars Schneider wrote: If you initialize errno to 0 right before a syscall, then yes, you can trust it without checking the return value of the syscall. I wouldn't trust it before calling more complicated

Re: [PATCH v5 4/8] convert: Separate generic structures and variables from the filter specific ones

2017-04-18 Thread Ben Peart
On 4/16/2017 11:31 PM, Junio C Hamano wrote: Lars Schneider writes: -static struct cmd2process *find_multi_file_filter_entry(struct hashmap *hashmap, const char *cmd) +static struct subprocess_entry *find_multi_file_filter_entry(const char *cmd) I am curious why

[PATCH v6 7/8] sub-process: move sub-process functions into separate files

2017-04-21 Thread Ben Peart
Move the sub-proces functions into sub-process.h/c. Add documentation for the new module in Documentation/technical/api-sub-process.txt Signed-off-by: Ben Peart <benpe...@microsoft.com> --- Documentation/technical/api-sub-process.txt | 59 Ma

[PATCH v6 6/8] convert: rename reusable sub-process functions

2017-04-21 Thread Ben Peart
Do a mechanical rename of the functions that will become the reusable sub-process module. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/convert.c b/convert.c

[PATCH v6 3/8] convert: Split start_multi_file_filter into two separate functions

2017-04-21 Thread Ben Peart
specific initialization function that will negotiate the multi-file-filter interface version and capabilities. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 62 -- 1 file changed, 36 insertions(+), 26 deletions(-)

[PATCH v6 1/8] pkt-line: add packet_read_line_gently()

2017-04-21 Thread Ben Peart
Add packet_read_line_gently() to enable reading a line without dying on EOF. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- pkt-line.c | 14 +- pkt-line.h | 10 ++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/pkt-line.c b/pkt-line.c index d4b6

[PATCH v6 2/8] convert: move packet_write_list() into pkt-line as packet_writel()

2017-04-21 Thread Ben Peart
Add packet_writel() which writes multiple lines in a single call and then calls packet_flush_gently(). Update convert.c to use the new packet_writel() function from pkt-line. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 23 ++- pkt-line.

[PATCH v6 4/8] convert: Separate generic structures and variables from the filter specific ones

2017-04-21 Thread Ben Peart
into the generic functions. cmd2process is a filter protocol specific structure that is used to track the negotiated capabilities of the filter. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.c | 35 --- 1 file changed, 20 insertions(+), 15 del

[PATCH v6 5/8] convert: Update generic functions to only use generic data structures

2017-04-21 Thread Ben Peart
Update all functions that are going to be moved into a reusable module so that they only work with the reusable data structures. Move code that is specific to the filter out into the filter specific functions. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- convert.

[PATCH v6 8/8] convert: Update subprocess_read_status to not die on EOF

2017-04-21 Thread Ben Peart
Enable sub-processes to gracefully handle when the process dies by updating subprocess_read_status to return an error on EOF instead of dying. Update apply_multi_file_filter to take advantage of the revised subprocess_read_status. Signed-off-by: Ben Peart <benpe...@microsoft.com> --- con

[PATCH v6 0/8] refactor the filter process code into a reusable module

2017-04-21 Thread Ben Peart
l commands Ben Peart (8): pkt-line: add packet_read_line_gently() convert: move packet_write_list() into pkt-line as packet_writel() convert: Split start_multi_file_filter into two separate functions convert: Separate generic structures and variables from the filter specific ones conve

Re: [RFC PATCH 1/4] environment, fsck: introduce lazyobject extension

2017-07-28 Thread Ben Peart
On 7/27/2017 2:55 PM, Junio C Hamano wrote: Jonathan Tan writes: Currently, Git does not support repos with very large numbers of objects or repos that wish to minimize manipulation of certain blobs (for example, because they are very large) very well, even if the

Re: [RFC PATCH 0/4] Some patches for fsck for missing objects

2017-07-28 Thread Ben Peart
On 7/27/2017 1:25 PM, Jonathan Tan wrote: On Wed, 26 Jul 2017 23:42:38 + "brian m. carlson" wrote: I looked at this and I like the direction it's going. It's pretty simple and straightforward, which I also like. ditto, simple is good! Thanks. What

Re: [RFC PATCH 2/4] fsck: support refs pointing to lazy objects

2017-07-28 Thread Ben Peart
On 7/27/2017 7:50 PM, Jonathan Tan wrote: On Thu, 27 Jul 2017 11:59:47 -0700 Junio C Hamano wrote: @@ -438,6 +438,14 @@ static int fsck_handle_ref(const char *refname, const struct object_id *oid, obj = parse_object(oid); if (!obj) { + if

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

2017-08-15 Thread Ben Peart
On 8/15/2017 1:36 PM, Christian Couder wrote: In handshake_capabilities() we use warning() when a capability is not supported, so the exit code of the function is 0 and no further error is shown. This is a problem because the warning message doesn't tell us which subprocess cmd failed. On the

Re: [PATCH v2 1/2] clang-format: outline the git project's coding style

2017-08-15 Thread Ben Peart
On 8/14/2017 5:30 PM, Brandon Williams wrote: Add a '.clang-format' file which outlines the git project's coding style. This can be used with clang-format to auto-format .c and .h files to conform with git's style. Signed-off-by: Brandon Williams --- .clang-format | 165

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

2017-08-16 Thread Ben Peart
On 8/16/2017 8:40 AM, Christian Couder wrote: In handshake_capabilities() we use warning() when a capability is not supported, so the exit code of the function is 0 and no further error is shown. This is a problem because the warning message doesn't tell us which subprocess cmd failed. On the

Re: [PATCH v2 1/2] clang-format: outline the git project's coding style

2017-08-15 Thread Ben Peart
On 8/14/2017 6:02 PM, Stefan Beller wrote: On Mon, Aug 14, 2017 at 2:30 PM, Brandon Williams wrote: Add a '.clang-format' file which outlines the git project's coding style. This can be used with clang-format to auto-format .c and .h files to conform with git's style.

Re: [RFC] clang-format: outline the git project's coding style

2017-08-11 Thread Ben Peart
On 8/10/2017 5:30 PM, Brandon Williams wrote: On 08/10, Junio C Hamano wrote: Brandon Williams writes: On 08/10, Junio C Hamano wrote: I vaguely recall that there was a discussion to have SubmitGit wait for success from Travis CI; if that is already in place, then I

Re: [PATCH v2 00/25] Move exported packfile funcs to its own file

2017-08-11 Thread Ben Peart
On 8/8/2017 9:22 PM, Jonathan Tan wrote: Here is the complete patch set. I have only moved the exported functions that operate with packfiles and their static helpers - for example, static functions like freshen_packed_object() that are used only by non-pack-specific functions are not moved.

Re: [RFC PATCH 01/10] pack: move pack name-related functions

2017-08-11 Thread Ben Peart
On 8/9/2017 1:16 PM, Jonathan Tan wrote: On Wed, 9 Aug 2017 14:00:40 +0200 Christian Couder wrote: On Tue, Aug 8, 2017 at 10:50 PM, Jonathan Tan wrote: On Tue, 8 Aug 2017 13:36:24 -0700 Stefan Beller wrote: There

Re: [PATCH v5 7/7] fsmonitor: add a performance test

2017-07-07 Thread Ben Peart
On 6/14/2017 2:36 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: Having said all that, I think you are using this ONLY on windows; perhaps it is better to drop #ifdef GIT_WINDOWS_NATIVE from all of the above and arrange Makefile to build test-drop-cach

Re: [PATCH v5 7/7] fsmonitor: add a performance test

2017-07-07 Thread Ben Peart
On 7/7/2017 2:35 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: On 6/14/2017 2:36 PM, Junio C Hamano wrote: Ben Peart <peart...@gmail.com> writes: Having said all that, I think you are using this ONLY on windows; perhaps it is better to drop #ifdef GIT_WI

Re: [PATCH v5 4/7] fsmonitor: add test cases for fsmonitor extension

2017-07-07 Thread Ben Peart
On 6/27/2017 12:20 PM, Christian Couder wrote: On Sat, Jun 10, 2017 at 3:40 PM, Ben Peart <peart...@gmail.com> wrote: +# fsmonitor works correctly with or without the untracked cache +# but if it is available, we'll turn it on to ensure we test that +# codepath as well. + +test_lazy_

[RFC/PATCH v2 0/1] Add support for downloading blobs on demand

2017-07-14 Thread Ben Peart
hostetler.com/ [RFC PATCH 0/3] Partial clone: promised blobs (formerly "missing blobs") [4] https://public-inbox.org/git/cover.1499800530.git.jonathanta...@google.com/ Ben Peart (1): sha1_file: Add support for downloading blobs on demand Documentation/technical/read-object-protocol.t

  1   2   3   4   5   6   7   >