Re: [PATCH 03/27] object-store: move alt_odb_list and alt_odb_tail to object store

2018-02-21 Thread Brandon Williams
rectory()); > > prepare_alt_odb(); > - for (alt = alt_odb_list; alt; alt = alt->next) > + for (alt = the_repository->objects.alt_odb_list; > + alt; alt = alt->next) Indentation on this line looks odd. -- Brandon Williams

Re: [PATCH 02/27] object-store: migrate alternates struct and functions from cache.h

2018-02-21 Thread Brandon Williams
ause cache.h includes > repository.h which in turn includes the object-store.h Nice. Always love seeing cache.h get smaller -- Brandon Williams

Re: [PATCH v3 00/35] protocol version 2

2018-02-21 Thread Brandon Williams
On 02/06, Brandon Williams wrote: > Changes in v3: > * There were some comments about how the protocol should be designed >stateless first. I've made this change and instead of having to >supply the `stateless-rpc=true` capability to force stateless >behavior, th

[PATCH] submodule: indicate that 'submodule.recurse' doesn't apply to clone

2018-02-20 Thread Brandon Williams
Update the documentation for the 'submodule.recurse' config to identify that the clone command does not respect it. Signed-off-by: Brandon Williams <bmw...@google.com> --- Documentation/config.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/config

Re: [PATCH 2/2] remote-curl: unquote incoming push-options

2018-02-20 Thread Brandon Williams
s > http' ' > test_cmp expect actual > ' > > +test_expect_success 'push options keep quoted characters intact (http)' ' > + mk_http_pair true && > + > + test_commit -C test_http_clone one && > + git -C test_http_clone push --push-option="\"embedded quotes\"" origin > master && > + echo "\"embedded quotes\"" >expect && > + test_cmp expect > "$HTTPD_DOCUMENT_ROOT_PATH"/upstream.git/hooks/pre-receive.push_options > +' > + > stop_httpd > > test_done > -- > 2.16.2.552.gea2a3cf654 -- Brandon Williams

Re: [PATCHv2 00/16] Moving global state into the repository object (part 1)

2018-02-20 Thread Brandon Williams
make it easier to write the patches (which most of them are already written) and to review because you can use the #define trick to make some sort of guarantees. After we have successfully completed the migration to f(repo), then we can revisit the subsystems which want to have a clearer abstraction layer and make the jump to f(repo->object_store). -- Brandon Williams

Re: [PATCH 0/3] a few grep patches

2018-02-15 Thread Brandon Williams
e > > builtin/grep.c | 25 - > grep.c | 8 ++-- > 2 files changed, 18 insertions(+), 15 deletions(-) > > -- > 2.15.1 > -- Brandon Williams

Re: [PATCH v2 06/37] diff: rename 'this' variables

2018-02-14 Thread Brandon Williams
On 02/14, Junio C Hamano wrote: > Brandon Williams <bmw...@google.com> writes: > > > Rename C++ keyword in order to bring the codebase closer to being able > > to be compiled with a C++ compiler. > > > > Signed-off-by: Brandon Williams <bmw...@google.co

[PATCH v2 35/37] tempfile: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- tempfile.c | 12 ++-- tempfile.h | 34 +- 2 files changed, 23 insertions(+), 23 del

[PATCH v2 13/37] remote: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/remote.c | 66 1 file changed, 33 insertions(+), 33 deletions(-) diff

[PATCH v2 08/37] apply: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- apply.c | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff

[PATCH v2 14/37] combine-diff: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- combine-diff.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/combine-diff.c b/combine-diff.c

[PATCH v2 37/37] replace: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/replace.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/b

[PATCH v2 07/37] apply: rename 'try' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- apply.c | 68 - 1 file changed, 34 insertions(+), 34 deletions(-) diff

[PATCH v2 36/37] trailer: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- trailer.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trailer.c b/trailer.c index 5a4

[PATCH v2 17/37] diff: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- diff.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/di

[PATCH v2 32/37] diff: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- diff.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/diff.c b/diff.c index 2de9c5ed2..5e4

[PATCH v2 31/37] environment: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- cache.h | 2 +- environment.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cac

[PATCH v2 16/37] diff-lib: rename 'new' variable

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- diff-lib.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/diff-l

[PATCH v2 30/37] init-db: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/init-db.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/builti

[PATCH v2 33/37] environment: rename 'namespace' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- environment.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/environment.c b/environment.c

[PATCH v2 34/37] wrapper: rename 'template' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- git-compat-util.h | 4 ++-- wrapper.c | 40 2 files changed, 22 insertions(

[PATCH v2 18/37] diffcore-delta: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- diffcore-delta.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/diffcore-delta.c b/di

[PATCH v2 19/37] entry: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- entry.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/ent

[PATCH v2 26/37] split-index: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- split-index.c | 16 split-index.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a

[PATCH v2 29/37] unpack-trees: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- unpack-trees.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c

[PATCH v2 27/37] submodule: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- submodule.c | 30 +++--- submodule.h | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff

[PATCH v2 28/37] trailer: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- trailer.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/trail

[PATCH v2 25/37] remote: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- remote.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/remote.c b/remote.c

[PATCH v2 24/37] ref-filter: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- ref-filter.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ref-filter.c b/ref-filter.c

[PATCH v2 21/37] imap-send: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- imap-send.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/imap-send.c b/imap-send.c

[PATCH v2 22/37] line-log: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- line-log.c | 56 +++--- 1 file changed, 28 insertions(+), 28 deletions(-) diff

[PATCH v2 23/37] read-cache: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- read-cache.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git

[PATCH v2 20/37] http: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- http.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/http.c b/http.c index 597771271..41c

[PATCH v2 06/37] diff: rename 'this' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- diff.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/diff.c b/diff.c index 0a9a0cdf1..d682d0d1f

[PATCH v2 09/37] checkout: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/checkout.c | 196 ++--- 1 file changed, 98 insertions(+), 98 deletions(-) diff

[PATCH v2 15/37] commit: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- commit.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/commit.c b/commit.c index cd9

[PATCH v2 10/37] help: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/help.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/help.c b/builtin/help.c

[PATCH v2 11/37] pack-redundant: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/pack-redundant.c | 54 1 file changed, 27 insertions(+), 27 deletions(-) diff

[PATCH v2 12/37] reflog: rename 'new' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/reflog.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/reflog.c b/builtin/re

[PATCH v2 03/37] blame: rename 'this' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- blame.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/blame.c b/b

[PATCH v2 05/37] rev-parse: rename 'this' variable

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/rev-parse.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/b

[PATCH v2 02/37] object: rename function 'typename' to 'type_name'

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/cat-file.c | 2 +- builtin/diff-tree.c| 2 +- builtin/fast-ex

[PATCH v2 04/37] pack-objects: rename 'this' variables

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/pack-objects.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/pack-objects.c b/b

[PATCH v2 01/37] object_info: change member name from 'typename' to 'type_name'

2018-02-14 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/cat-file.c | 2 +- cache.h| 2 +- packfile.c | 6 +++--- sha1_file.c| 10 +- 4

[PATCH v2 00/37] removal of some c++ keywords

2018-02-14 Thread Brandon Williams
One person was interested enough for me to go back through and also rename all the paired 'old' variables to match the new names for the variables which were named 'new'. Brandon Williams (37): object_info: change member name from 'typename' to 'type_name' object: rename function 'typename

Re: What's cooking in git.git (Feb 2018, #02; Tue, 13)

2018-02-14 Thread Brandon Williams
d, i.e. will drop if other topics start to conflict with > it, but will accept rerolls. I was under the impression that people didn't care too much about this (which is a shame but that's an opinion :). If people were more interested in a change like this then I'd be happy to go back through and rename the 'old' variables too. -- Brandon Williams

Re: [PATCH 14/26] sha1_file: allow prepare_alt_odb to handle arbitrary repositories

2018-02-14 Thread Brandon Williams
t; - _repository->objects.alt_odb_list; > > - link_alt_odb_entries(the_repository, alt, > > - PATH_SEP, NULL, 0); > > + link_alt_odb_entries(r, alt, PATH_SEP, NULL, 0); > > + } > > > > - read_info_alternates(the_repository, get_object_directory(), 0); > > + read_info_alternates(r, r->objects.objectdir, 0); > > } > > > > /* Returns 1 if we have successfully freshened the file, 0 otherwise. */ > > -- > > 2.16.1.73.ga2c3e9663f.dirty > > > > > > -- > Duy -- Brandon Williams

Re: [PATCH 00/26] Moving global state into the repository object (part 1)

2018-02-13 Thread Brandon Williams
| 135 > +--- > sha1_name.c | 11 +- > streaming.c | 5 +- > 36 files changed, 321 insertions(+), 182 deletions(-) > create mode 100644 contrib/coccinelle/refactoring/packed_git.cocci > create mode 100644 object-store.h > > -- > 2.16.1.73.ga2c3e9663f.dirty > -- Brandon Williams

Re: [PATCH 02/26] object-store: move alt_odb_list and alt_odb_tail to object store

2018-02-13 Thread Brandon Williams
_sha1_file(const unsigned char *sha1, > const char **path) > most_interesting_errno = errno; > > prepare_alt_odb(); > - for (alt = alt_odb_list; alt; alt = alt->next) { > + for (alt = the_repository->objects.alt_odb_list; alt; alt = alt->next) { > *path = alt_sha1_path(alt, sha1); > fd = git_open(*path); > if (fd >= 0) > diff --git a/sha1_name.c b/sha1_name.c > index 611c7d24dd..957ce25680 100644 > --- a/sha1_name.c > +++ b/sha1_name.c > @@ -10,6 +10,7 @@ > #include "dir.h" > #include "sha1-array.h" > #include "packfile.h" > +#include "repository.h" > > static int get_oid_oneline(const char *, struct object_id *, struct > commit_list *); > > @@ -104,7 +105,7 @@ static void find_short_object_filename(struct > disambiguate_state *ds) >*/ > fakeent = alloc_alt_odb(get_object_directory()); > } > - fakeent->next = alt_odb_list; > + fakeent->next = the_repository->objects.alt_odb_list; > > for (alt = fakeent; alt && !ds->ambiguous; alt = alt->next) { > int pos; > -- > 2.16.1.73.ga2c3e9663f.dirty > -- Brandon Williams

Re: [PATCH v3 22/35] upload-pack: support shallow requests

2018-02-13 Thread Brandon Williams
On 02/07, Stefan Beller wrote: > On Tue, Feb 6, 2018 at 5:12 PM, Brandon Williams <bmw...@google.com> wrote: > > Add the 'shallow' feature to the protocol version 2 command 'fetch' > > which indicates that the server supports shallow clients and deepen > > requets. >

Re: [PATCH 00/26] Moving global state into the repository object (part 1)

2018-02-13 Thread Brandon Williams
hem in raw_object_store and ignore_env should > be gone. So sticking it inside raw_object_store _temporarily_ does not > sound so bad. I like this approach, I mean at the moment we are replicating a single bit of data but that allows us to be able to limit the scope of where a repository struct is passed, giving us a better abstraction layer. > -- > Duy -- Brandon Williams

Re: Fetch-hooks

2018-02-12 Thread Brandon Williams
ote/heads/my-branch. In order to avoid any > issue, the hook is not allowed to pass as second output a reference that > was not passed as second input. > > This way, the behavior of the tweak-fetch hook is reasonably preserved > (at least for my use case), and there is no additiona

[PATCH v3 07/35] connect: convert get_remote_heads to use struct packet_reader

2018-02-06 Thread Brandon Williams
the first ref sent in the protocol_v0 case so that the protocol version the server is speaking can be determined outside of 'get_remote_heads()' in a future patch. Signed-off-by: Brandon Williams <bmw...@google.com> --- connect.c

[PATCH v3 20/35] upload-pack: introduce fetch server command

2018-02-06 Thread Brandon Williams
Introduce the 'fetch' server command. Signed-off-by: Brandon Williams <bmw...@google.com> --- Documentation/technical/protocol-v2.txt | 127 +++ serve.c | 2 + t/t5701-git-serve.sh| 1 + upload-

[PATCH v3 15/35] transport: convert get_refs_list to take a list of ref patterns

2018-02-06 Thread Brandon Williams
on the sent patterns. Signed-off-by: Brandon Williams <bmw...@google.com> --- transport-helper.c | 5 +++-- transport-internal.h | 4 +++- transport.c | 16 +--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/transport-helper.c b/transport-helper.c

[PATCH v3 27/35] transport-helper: refactor process_connect_service

2018-02-06 Thread Brandon Williams
A future patch will need to take advantage of the logic which runs and processes the response of the connect command on a remote helper so factor out this logic from 'process_connect_service()' and place it into a helper function 'run_connect()'. Signed-off-by: Brandon Williams <bmw...@google.

[PATCH v3 23/35] fetch-pack: support shallow requests

2018-02-06 Thread Brandon Williams
Enable shallow clones and deepen requests using protocol version 2 if the server 'fetch' command supports the 'shallow' feature. Signed-off-by: Brandon Williams <bmw...@google.com> --- connect.c| 22 +++ connect.h| 2 ++ fetch-pack.

[PATCH v3 24/35] connect: refactor git_connect to only get the protocol version once

2018-02-06 Thread Brandon Williams
in the next patch where we can have centralized logic which determines if we need to request a different protocol version than what the user has configured. Signed-off-by: Brandon Williams <bmw...@google.com> --- connect.c | 27 +++ 1 file changed, 15 insertions(+), 12 del

[PATCH v3 16/35] transport: convert transport_get_remote_refs to take a list of ref patterns

2018-02-06 Thread Brandon Williams
Convert 'transport_get_remote_refs()' to optionally take a list of ref patterns. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/clone.c | 2 +- builtin/fetch.c | 4 ++-- builtin/ls-remote.c | 2 +- builtin/remote.c| 2 +- transport.c | 7 +-- trans

[PATCH v3 19/35] push: pass ref patterns when pushing

2018-02-06 Thread Brandon Williams
Construct a list of ref patterns to be passed to 'get_refs_list()' from the refspec to be used during the push. This list of ref patterns will be used to allow the server to filter the ref advertisement when communicating using protocol v2. Signed-off-by: Brandon Williams <bmw...@google.

[PATCH v3 14/35] connect: request remote refs using v2

2018-02-06 Thread Brandon Williams
Teach the client to be able to request a remote's refs using protocol v2. This is done by having a client issue a 'ls-refs' request to a v2 server. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/upload-pack.c | 10 ++-- connect.c

[PATCH v3 30/35] remote-curl: create copy of the service name

2018-02-06 Thread Brandon Williams
Make a copy of the service name being requested instead of relying on the buffer pointed to by the passed in 'const char *' to remain unchanged. Signed-off-by: Brandon Williams <bmw...@google.com> --- remote-curl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/

[PATCH v3 29/35] pkt-line: add packet_buf_write_len function

2018-02-06 Thread Brandon Williams
Add the 'packet_buf_write_len()' function which allows for writing an arbitrary length buffer into a 'struct strbuf' and formatting it in packet-line format. Signed-off-by: Brandon Williams <bmw...@google.com> --- pkt-line.c | 16 pkt-line.h | 1 + 2 files chang

[PATCH v3 31/35] remote-curl: store the protocol version the server responded with

2018-02-06 Thread Brandon Williams
Store the protocol version the server responded with when performing discovery. This will be used in a future patch to either change the 'Git-Protocol' header sent in subsequent requests or to determine if a client needs to fallback to using a different protocol version. Signed-off-by: Brandon

[PATCH v3 22/35] upload-pack: support shallow requests

2018-02-06 Thread Brandon Williams
Add the 'shallow' feature to the protocol version 2 command 'fetch' which indicates that the server supports shallow clients and deepen requets. Signed-off-by: Brandon Williams <bmw...@google.com> --- Documentation/technical/protocol-v2.txt | 67 +++- s

[PATCH v3 34/35] remote-curl: implement stateless-connect command

2018-02-06 Thread Brandon Williams
through to convert requests to http. Signed-off-by: Brandon Williams <bmw...@google.com> --- remote-curl.c | 187 - t/t5702-protocol-v2.sh | 41 +++ 2 files changed, 227 insertions(+), 1 deletion(-) diff --git a/remote-curl.c b/

[PATCH v3 25/35] connect: don't request v2 when pushing

2018-02-06 Thread Brandon Williams
' endpoint and fall back to using v0, but when push v2 is rolled out to servers, the 'receive-pack' endpoint will start responding using v2. So we don't want to get into a state where a client is requesting to push with v2 before they actually know how to push using v2. Signed-off-by: Brandon

[PATCH v3 32/35] http: allow providing extra headers for http requests

2018-02-06 Thread Brandon Williams
Add a way for callers to request that extra headers be included when making http requests. Signed-off-by: Brandon Williams <bmw...@google.com> --- http.c | 8 http.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/http.c b/http.c index 597771271..e1757d62b 100644 --- a/

[PATCH v3 35/35] remote-curl: don't request v2 when pushing

2018-02-06 Thread Brandon Williams
' endpoint and fall back to using v0, but when push v2 is rolled out to servers, the 'receive-pack' endpoint will start responding using v2. So we don't want to get into a state where a client is requesting to push with v2 before they actually know how to push using v2. Signed-off-by: Brandon

[PATCH v3 33/35] http: don't always add Git-Protocol header

2018-02-06 Thread Brandon Williams
Instead of always sending the Git-Protocol header with the configured version with every http request, explicitly send it when discovering refs and then only send it on subsequent http requests if the server understood the version requested. Signed-off-by: Brandon Williams <bmw...@google.

[PATCH v3 26/35] transport-helper: remove name parameter

2018-02-06 Thread Brandon Williams
necessary but wasn't removed. Clean up 'recvline_fh()' parameter list by removing the 'name' parameter. Signed-off-by: Brandon Williams <bmw...@google.com> --- transport-helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/transport-helper.c b/transport-helper.c

[PATCH v3 28/35] transport-helper: introduce stateless-connect

2018-02-06 Thread Brandon Williams
connection cannot be established then the remote-helper will respond in the same manner as the 'connect' command indicating that the client should fallback to using the dumb remote-helper commands. Signed-off-by: Brandon Williams <bmw...@google.com> --- transport-helper.c | 8 trans

[PATCH v3 21/35] fetch-pack: perform a fetch using v2

2018-02-06 Thread Brandon Williams
When communicating with a v2 server, perform a fetch by requesting the 'fetch' command. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/fetch-pack.c | 2 +- fetch-pack.c | 252 - fetch-pack.h | 4

[PATCH v3 08/35] connect: discover protocol version outside of get_remote_heads

2018-02-06 Thread Brandon Williams
-by: Brandon Williams <bmw...@google.com> --- builtin/fetch-pack.c | 16 +++- builtin/send-pack.c | 17 +++-- connect.c| 27 ++- connect.h| 3 +++ remote-curl.c| 20 ++-- remote.h

[PATCH v3 05/35] upload-pack: factor out processing lines

2018-02-06 Thread Brandon Williams
Factor out the logic for processing shallow, deepen, deepen_since, and deepen_not lines into their own functions to simplify the 'receive_needs()' function in addition to making it easier to reuse some of this logic when implementing protocol_v2. Signed-off-by: Brandon Williams <bmw...@google.

[PATCH v3 18/35] fetch: pass ref patterns when fetching

2018-02-06 Thread Brandon Williams
Construct a list of ref patterns to be passed to 'transport_get_remote_refs()' from the refspec to be used during the fetch. This list of ref patterns will be used to allow the server to filter the ref advertisement when communicating using protocol v2. Signed-off-by: Brandon Williams <

[PATCH v3 03/35] pkt-line: add delim packet support

2018-02-06 Thread Brandon Williams
to indicate the end of a response. Signed-off-by: Brandon Williams <bmw...@google.com> --- pkt-line.c | 17 + pkt-line.h | 3 +++ 2 files changed, 20 insertions(+) diff --git a/pkt-line.c b/pkt-line.c index 4fc9ad4b0..726e109ca 100644 --- a/pkt-line.c +++ b/pkt-line.c @@ -91,6

[PATCH v3 09/35] transport: store protocol version

2018-02-06 Thread Brandon Williams
-by: Brandon Williams <bmw...@google.com> --- transport.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/transport.c b/transport.c index 63c3dbab9..2378dcb38 100644 --- a/transport.c +++ b/transport.c @@ -118,6 +118,7 @@ struct git_transpor

[PATCH v3 13/35] ls-refs: introduce ls-refs server command

2018-02-06 Thread Brandon Williams
based on provided ref-patterns. Signed-off-by: Brandon Williams <bmw...@google.com> --- Documentation/technical/protocol-v2.txt | 32 + Makefile| 1 + ls-refs.c | 96 ++ ls-

[PATCH v3 11/35] test-pkt-line: introduce a packet-line test helper

2018-02-06 Thread Brandon Williams
Introduce a packet-line test helper which can either pack or unpack an input stream into packet-lines and writes out the result to stdout. Signed-off-by: Brandon Williams <bmw...@google.com> --- Makefile | 1 + t/helper/test-pkt-line.

[PATCH v3 12/35] serve: introduce git-serve

2018-02-06 Thread Brandon Williams
. At the completion of a command, a client can request that another command be executed or can terminate the connection by sending a flush packet. Signed-off-by: Brandon Williams <bmw...@google.com> --- .gitignore | 1 + Documentation/technical/protocol-v2.txt

[PATCH v3 10/35] protocol: introduce enum protocol_version value protocol_v2

2018-02-06 Thread Brandon Williams
Introduce protocol_v2, a new value for 'enum protocol_version'. Subsequent patches will fill in the implementation of protocol_v2. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/fetch-pack.c | 3 +++ builtin/receive-pack.c | 6 ++ builtin/send-pack.c| 3 +++ b

[PATCH v3 06/35] transport: use get_refs_via_connect to get refs

2018-02-06 Thread Brandon Williams
Remove code duplication and use the existing 'get_refs_via_connect()' function to retrieve a remote's heads in 'fetch_refs_via_pack()' and 'git_transport_push()'. Signed-off-by: Brandon Williams <bmw...@google.com> --- transport.c | 18 -- 1 file changed, 4 insertions(

[PATCH v3 17/35] ls-remote: pass ref patterns when requesting a remote's refs

2018-02-06 Thread Brandon Williams
Construct an argv_array of the ref patterns supplied via the command line and pass them to 'transport_get_remote_refs()' to be used when communicating protocol v2 so that the server can limit the ref advertisement based on the supplied patterns. Signed-off-by: Brandon Williams <bmw...@google.

[PATCH v3 02/35] pkt-line: introduce struct packet_reader

2018-02-06 Thread Brandon Williams
a caller to be able to peek a single line at a time using 'packet_reader_peek()' and having a caller consume a line by calling 'packet_reader_read()'. Signed-off-by: Brandon Williams <bmw...@google.com> --- pkt-line.c | 59 +++ pkt-line.

[PATCH v3 01/35] pkt-line: introduce packet_read_with_status

2018-02-06 Thread Brandon Williams
between special and normal packets as well as errors. It also enables easily adding a new special packet in the future. Signed-off-by: Brandon Williams <bmw...@google.com> --- pkt-line.c | 57 +++-- pkt-line.h | 15 +++ 2 files c

[PATCH v3 00/35] protocol version 2

2018-02-06 Thread Brandon Williams
state, baring any more critical reviewing feedback. Thanks! Brandon Williams (35): pkt-line: introduce packet_read_with_status pkt-line: introduce struct packet_reader pkt-line: add delim packet support upload-pack: convert to a builtin upload-pack: factor out processing lines transport

[PATCH v3 04/35] upload-pack: convert to a builtin

2018-02-06 Thread Brandon Williams
In order to allow for code sharing with the server-side of fetch in protocol-v2 convert upload-pack to be a builtin. Signed-off-by: Brandon Williams <bmw...@google.com> --- Makefile | 3 +- builtin.h | 1 + builtin/upload-pack.c

Re: [PATCH v2 00/27] protocol version 2

2018-02-06 Thread Brandon Williams
t I could do. > > On 1/25/2018 6:58 PM, Brandon Williams wrote: > > Changes in v2: > > * Added documentation for fetch > > * changes #defines for state variables to be enums > > * couple code changes to pkt-line functions and documentation > > * Added unit

Re: [PATCH 12/26] ls-refs: introduce ls-refs server command

2018-02-06 Thread Brandon Williams
On 02/01, Jeff Hostetler wrote: > > > On 1/2/2018 7:18 PM, Brandon Williams wrote: > > Introduce the ls-refs server command. In protocol v2, the ls-refs > > command is used to request the ref advertisement from the server. Since > > it is a command which c

Re: [PATCH v1] dir.c: don't flag the index as dirty for changes to the untracked cache

2018-02-05 Thread Brandon Williams
4522.5571-1-pclo...@gmail.com> if you want to know > # more. > > +GIT_TEST_UNTRACKED_CACHE=true > +export GIT_TEST_UNTRACKED_CACHE > + > sync_mtime () { > find . -type d -ls >/dev/null > } > > base-commit: 5be1f00a9a701532232f57958efab4be8c959a29 > -- > 2.15.0.windows.1 > -- Brandon Williams

Re: [PATCH v2 10/27] protocol: introduce enum protocol_version value protocol_v2

2018-02-02 Thread Brandon Williams
On 01/31, Derrick Stolee wrote: > On 1/25/2018 6:58 PM, Brandon Williams wrote: > > Introduce protocol_v2, a new value for 'enum protocol_version'. > > Subsequent patches will fill in the implementation of protocol_v2. > > > > Signed-off-by: Brandon

Re: [PATCH v2 13/27] ls-refs: introduce ls-refs server command

2018-02-02 Thread Brandon Williams
On 01/26, Stefan Beller wrote: > On Thu, Jan 25, 2018 at 3:58 PM, Brandon Williams <bmw...@google.com> wrote: > > > +ls-refs takes in the following parameters wrapped in packet-lines: > > + > > +symrefs > > + In addition to the object po

Re: [PATCH 11/26] serve: introduce git-serve

2018-02-01 Thread 'Brandon Williams'
On 02/01, Randall S. Becker wrote: > On February 1, 2018 1:58 PM, Stefan Beller wrote: > > On Thu, Feb 1, 2018 at 10:48 AM, Jeff Hostetler <g...@jeffhostetler.com> > > wrote: > > > > > > > > > On 1/2/2018 7:18 PM, Brandon Williams wrote: &g

Re: [PATCH 11/26] serve: introduce git-serve

2018-02-01 Thread Brandon Williams
On 02/01, Jeff Hostetler wrote: > > > On 2/1/2018 1:57 PM, Stefan Beller wrote: > > On Thu, Feb 1, 2018 at 10:48 AM, Jeff Hostetler <g...@jeffhostetler.com> > > wrote: > > > > > > > > > On 1/2/2018 7:18 PM, Brandon Williams wrote:

Re: [PATCH v2 08/27] connect: discover protocol version outside of get_remote_heads

2018-02-01 Thread Brandon Williams
On 01/31, Derrick Stolee wrote: > On 1/25/2018 6:58 PM, Brandon Williams wrote: > > In order to prepare for the addition of protocol_v2 push the protocol > > version discovery outside of 'get_remote_heads()'. This will allow for > > keeping the logic for processing the re

[PATCH 13/37] remote: rename 'new' variables

2018-01-29 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/remote.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff

[PATCH 12/37] reflog: rename 'new' variables

2018-01-29 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/reflog.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/reflog.c b/builtin/re

[PATCH 11/37] pack-redundant: rename 'new' variables

2018-01-29 Thread Brandon Williams
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmw...@google.com> --- builtin/pack-redundant.c | 48 1 file changed, 24 insertions(+), 24 del

<    1   2   3   4   5   6   7   8   9   10   >