[PATCH v4 05/20] environment: place key repository state in the_repository

2017-06-22 Thread Brandon Williams
Migrate 'git_dir', 'git_common_dir', 'git_object_dir', 'git_index_file', 'git_graft_file', and 'namespace' to be stored in 'the_repository'. Signed-off-by: Brandon Williams --- cache.h | 1 - environment.c |

[PATCH v4 00/20] repository object

2017-06-22 Thread Brandon Williams
dent on on 'bw/config-h' and 'bw/ls-files-sans-the-index' Brandon Williams (20): setup: don't perform lazy initialization of repository state setup: add comment indicating a hack environment: remove namespace_len variable repository: introduce the reposit

[PATCH v4 02/20] setup: add comment indicating a hack

2017-06-22 Thread Brandon Williams
mment indicating that this envvar should be removed once 'ls-files' and 'grep' can recurse in-process. Signed-off-by: Brandon Williams --- setup.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/setup.c b/setup.c index 24a738b0d..b477faa44 100644 -

[PATCH v4 03/20] environment: remove namespace_len variable

2017-06-22 Thread Brandon Williams
Use 'skip_prefix' instead of 'starts_with' so that we can drop the need to keep around 'namespace_len'. Signed-off-by: Brandon Williams --- environment.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/environment.c b/environment.c ind

[PATCH v4 06/20] environment: store worktree in the_repository

2017-06-22 Thread Brandon Williams
Migrate 'work_tree' to be stored in 'the_repository'. Signed-off-by: Brandon Williams --- environment.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/environment.c b/environment.c index aa79ef83e..3fd4b1084 100644 --- a/environment.c +++ b/en

[PATCH v4 09/20] path: convert strbuf_git_common_path to take a 'struct repository'

2017-06-22 Thread Brandon Williams
Signed-off-by: Brandon Williams --- path.c | 13 - path.h | 8 ++-- worktree.c | 3 ++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/path.c b/path.c index 2434921d8..9be6804a9 100644 --- a/path.c +++ b/path.c @@ -524,11 +524,12 @@ int

[PATCH v4 08/20] path: always pass in commondir to update_common_dir

2017-06-22 Thread Brandon Williams
Instead of passing in 'NULL' and having 'update_common_dir()' query for the commondir, have the callers of 'update_common_dir()' be responsible for providing the commondir. Signed-off-by: Brandon Williams --- path.c | 4 +--- 1 file changed, 1 insertion(+), 3 delet

[PATCH v4 07/20] path: create path.h

2017-06-22 Thread Brandon Williams
Move all path related declarations from cache.h to a new path.h header file. This makes cache.h smaller and makes it easier to add new path related functions. Signed-off-by: Brandon Williams --- cache.h | 59 +-- path.c | 1 + path.h

[PATCH v4 10/20] path: convert do_git_path to take a 'struct repository'

2017-06-22 Thread Brandon Williams
In preparation to adding 'git_path' like functions which operate on a 'struct repository' convert 'do_git_path' to take a 'struct repository'. Signed-off-by: Brandon Williams --- path.c | 42 -- 1 file changed,

[PATCH v4 16/20] submodule-config: store the_submodule_cache in the_repository

2017-06-22 Thread Brandon Williams
Refactor how 'the_submodule_cache' is handled so that it can be stored inside of a repository object. Also migrate 'the_submodule_cache' to be stored in 'the_repository'. Signed-off-by: Brandon Williams --- repository.c | 6 + repository.h | 4

[PATCH v4 18/20] submodule: convert is_submodule_initialized to work on a repository

2017-06-22 Thread Brandon Williams
Convert 'is_submodule_initialized()' to take a repository object and while we're at it, lets rename the function to 'is_submodule_active()' and remove the NEEDSWORK comment. Signed-off-by: Brandon Williams --- builtin/grep.c | 3 ++- builtin

[PATCH v4 11/20] path: worktree_git_path() should not use file relocation

2017-06-22 Thread Brandon Williams
the relocation logic for index, info/grafts, objects, and hooks to happen unconditionally instead of based on whether environment or configuration variables are set. This caused the relocation to trigger even when GIT_INDEX_FILE is not set. [jn: rewrote commit message; skipping all relocatio

[PATCH v4 14/20] config: read config from a repository object

2017-06-22 Thread Brandon Williams
ory' and just have the 'git_config_get*' family of functions redirect to the 'repo_config_get*' functions. Signed-off-by: Brandon Williams --- config.c | 216 +++ config.h | 24 +++ repository.c | 7 +

[PATCH v4 17/20] submodule: add repo_read_gitmodules

2017-06-22 Thread Brandon Williams
Teach the repo object to be able to populate the submodule_cache by reading the repository's gitmodules file. Signed-off-by: Brandon Williams --- submodule.c | 15 +++ submodule.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/submodule.c b/submodule.c index da0b

[PATCH v4 19/20] repository: enable initialization of submodules

2017-06-22 Thread Brandon Williams
3. The submodule remains uninitialized due to an error in the initialization process or there is no matching submodule at the provided path in the superproject. Signed-off-by: Brandon Williams --- repository.c | 54 ++ repository.h

[PATCH v4 15/20] repository: add index_state to struct repo

2017-06-22 Thread Brandon Williams
Signed-off-by: Brandon Williams --- repository.c | 16 repository.h | 9 + 2 files changed, 25 insertions(+) diff --git a/repository.c b/repository.c index 686a964ad..6f6f4d91e 100644 --- a/repository.c +++ b/repository.c @@ -163,4 +163,20 @@ void repo_clear(struct

[PATCH v4 20/20] ls-files: use repository object

2017-06-22 Thread Brandon Williams
Convert ls-files to use a repository struct and recurse submodules inprocess. Signed-off-by: Brandon Williams --- builtin/ls-files.c | 192 ++--- git.c | 2 +- t/t3007-ls-files-recurse-submodules.sh | 39

[PATCH v4 13/20] path: add repo_worktree_path and strbuf_repo_worktree_path

2017-06-22 Thread Brandon Williams
Introduce 'repo_worktree_path' and 'strbuf_repo_worktree_path' which take a repository struct and constructs a path relative to the repository's worktree. Signed-off-by: Brandon Williams --- path.c | 41 + path.h | 8

[PATCH v4 12/20] path: add repo_git_path and strbuf_repo_git_path

2017-06-22 Thread Brandon Williams
Introduce 'repo_git_path' and 'strbuf_repo_git_path' which take a repository struct and constructs a path into the repository's git directory. Signed-off-by: Brandon Williams --- path.c | 21 + path.h | 8 2 files changed, 29 insertions(

Re: [PATCH v4 15/20] repository: add index_state to struct repo

2017-06-22 Thread Brandon Williams
On 06/22, Junio C Hamano wrote: > Brandon Williams writes: > > > struct repository { > > /* Environment */ > > @@ -49,6 +50,12 @@ struct repository { > > */ > > struct config_set *config; > > > > + /* > > +* Repository

Re: [PATCHv2] submodules: overhaul documentation

2017-06-22 Thread Brandon Williams
On 06/22, Stefan Beller wrote: > On Thu, Jun 22, 2017 at 1:20 PM, Junio C Hamano wrote: > > Brandon Williams writes: > > > >> On 06/20, Stefan Beller wrote: > >> ... > >>> +The configuration of submodules > >>> +-

[PATCH] submodule--helper: teach push-check to handle HEAD

2017-06-23 Thread Brandon Williams
oth have the same named branch checked out and the submodule is not in a detached head state. Signed-off-by: Brandon Williams --- builtin/submodule--helper.c| 57 +++--- submodule.c| 18 ++--- t/t5531-deep-submodule-push.sh | 25 +

Re: [PATCH] submodule--helper: teach push-check to handle HEAD

2017-06-26 Thread Brandon Williams
On 06/23, Junio C Hamano wrote: > Brandon Williams writes: > > > In 06bf4ad1d (push: propagate remote and refspec with > > --recurse-submodules) push was taught how to propagate a refspec down to > > submodules when the '--recurse-submodules' flag is give

Re: [PATCH] strbuf: use designated initializers in STRBUF_INIT

2017-07-10 Thread Brandon Williams
> extern char strbuf_slopbuf[]; > -#define STRBUF_INIT { 0, 0, strbuf_slopbuf } > +#define STRBUF_INIT { .alloc = 0, .len = 0, .buf = strbuf_slopbuf } I love that this is happening! And maybe someday soon we can do: for (int i = 0; i < n; i++) So that we can scope loop variables to the loops themselves. -- Brandon Williams

Re: [PATCH 1/7] api-builtin.txt: document SUPPORT_SUPER_PREFIX

2017-07-10 Thread Brandon Williams
it until that happens? Either way I think that this sort of Documention better lives in the code as it is easier to keep up to date. Last time I tried to look at stuff in Documentation/technical the files were either place holders or completely out of date with what the code did. -- Brandon Williams

Re: [GSoC][PATCH 1/8] submodule--helper: introduce get_submodule_displaypath()

2017-07-10 Thread Brandon Williams
alized >*/ > if (!is_submodule_active(the_repository, path)) { > - strbuf_reset(&sb); Is this line removal intended? It doesn't look related to the rest of this patch. > strbuf_addf(&sb, "submodule.%s.active", sub->name); > git_config_set_gently(sb.buf, "true"); > } > -- > 2.13.0 > -- Brandon Williams

Re: [GSoC][PATCH 4/8] submodule: port submodule subcommand 'status' from shell to C

2017-07-10 Thread Brandon Williams
quot;$sm_path" || > - { > - ! test -d "$sm_path"/.git && > - ! test -f "$sm_path"/.git > - } > - then > - say "-$sha1 $displaypath" > - continue; > - fi > - if git diff-files --ignore-submodules=dirty --quiet -- > "$sm_path" > - then > - revname=$(git submodule--helper print-name-rev > "$sm_path" "$sha1") > - say " $sha1 $displaypath$revname" > - else > - if test -z "$cached" > - then > - sha1=$(sanitize_submodule_env; cd "$sm_path" && > git rev-parse --verify HEAD) > - fi > - revname=$(git submodule--helper print-name-rev > "$sm_path" "$sha1") > - say "+$sha1 $displaypath$revname" > - fi > - > - if test -n "$recursive" > - then > - ( > - prefix="$displaypath/" > - sanitize_submodule_env > - wt_prefix= > - cd "$sm_path" && > - eval cmd_status > - ) || > - die "$(eval_gettext "Failed to recurse into submodule > path '\$sm_path'")" > - fi > - done > + git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} > submodule--helper status ${GIT_QUIET:+--quiet} ${cached:+--cached} > ${recursive:+--recursive} "$@" > } > # > # Sync remote urls for submodules > -- > 2.13.0 > -- Brandon Williams

Re: [GSoC][PATCH 5/8] submodule: port submodule subcommand 'sync' from shell to C

2017-07-10 Thread Brandon Williams
7; "$sm_path" | sed > "s/[^/][^/]*/../g")" && > - # guarantee a trailing / > - up_path=${up_path%/}/ && > - # path from submodule work tree to submodule origin repo > - sub_origin_url=$(git submodule--helper > resolve-relative-url "$url" "$up_path") && > - # path from superproject work tree to submodule origin > repo > - super_config_url=$(git submodule--helper > resolve-relative-url "$url") || exit > - ;; > - *) > - sub_origin_url="$url" > - super_config_url="$url" > - ;; > - esac > > - displaypath=$(git submodule--helper relative-path > "$prefix$sm_path" "$wt_prefix") > - say "$(eval_gettext "Synchronizing submodule url for > '\$displaypath'")" > - git config submodule."$name".url "$super_config_url" > - > - if test -e "$sm_path"/.git > - then > - ( > - sanitize_submodule_env > - cd "$sm_path" > - remote=$(get_default_remote) > - git config remote."$remote".url "$sub_origin_url" > + git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} > submodule--helper sync ${GIT_QUIET:+--quiet} ${recursive:+--recursive} "$@" > > - if test -n "$recursive" > - then > - prefix="$prefix$sm_path/" > - eval cmd_sync > - fi > - ) > - fi > - done > } > > cmd_absorbgitdirs() > -- > 2.13.0 > -- Brandon Williams

Re: [GSoC][PATCH 1/8] submodule--helper: introduce get_submodule_displaypath()

2017-07-10 Thread Brandon Williams
On 07/10, Stefan Beller wrote: > On Mon, Jul 10, 2017 at 4:32 PM, Brandon Williams wrote: > >> if (!is_submodule_active(the_repository, path)) { > >> - strbuf_reset(&sb); > > > > Is this line removal intended? It doesn't look related

Re: [RFC/WIP PATCH] object store classification

2017-07-11 Thread Brandon Williams
t; > single default instance" for the_index. Whether you like it or not, > > the majority of operations do work on the default instance---that > > was why the operations could live with just "a set of global state > > variables" in the first place, and the convenience compatibility > > macros that allow you to operate on the fields of the default > > instance as if they were separate variables have been a huge > > typesaver that also reduces the cognitive burden. I'd expect that > > the same will hold for the new "repository" and the "object_store" > > abstractions. > > Sounds reasonable to expect. > > Thanks, > Stefan -- Brandon Williams

Re: [PATCH 1/7] api-builtin.txt: document SUPPORT_SUPER_PREFIX

2017-07-11 Thread Brandon Williams
On 07/11, Martin Ågren wrote: > On 11 July 2017 at 00:50, Brandon Williams wrote: > > On 07/10, Martin Ågren wrote: > >> Commit 74866d75 ("git: make super-prefix option", 2016-10-07) introduced > >> SUPPORT_SUPER_PREFIX as a builtin flag without documenting

[PATCH 2/3] setup: have the_repository use the_index

2017-07-11 Thread Brandon Williams
Have the index state which is stored in 'the_repository' be a pointer to the in-core instead 'the_index'. This makes it easier to begin transitioning more parts of the code base to operate on a 'struct repository'. Signed-off-by: Brandon Williams --- setup.c | 1

[PATCH 0/3] Convert grep to recurse in-process

2017-07-11 Thread Brandon Williams
used when launched a process for operating on a submodule. Brandon Williams (3): repo_read_index: don't discard the index setup: have the_repository use the_index grep: recurse in-process using 'struct repository' Documentation/git-grep.txt | 7 - builtin

[PATCH 1/3] repo_read_index: don't discard the index

2017-07-11 Thread Brandon Williams
Have 'repo_read_index()' behave more like the other read_index family of functions and don't discard the index if it has already been populated. Signed-off-by: Brandon Williams --- repository.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/repository.c b/repository.c

[PATCH 3/3] grep: recurse in-process using 'struct repository'

2017-07-11 Thread Brandon Williams
Convert grep to use 'struct repository' which enables recursing into submodules to be handled in-process. Signed-off-by: Brandon Williams --- Documentation/git-grep.txt | 7 - builtin/grep.c | 390 + cache.h

Re: [PATCH 1/3] repo_read_index: don't discard the index

2017-07-12 Thread Brandon Williams
On 07/11, Stefan Beller wrote: > On Tue, Jul 11, 2017 at 3:04 PM, Brandon Williams wrote: > > Have 'repo_read_index()' behave more like the other read_index family of > > functions and don't discard the index if it has already been populated. > >

Re: [PATCH 1/3] repo_read_index: don't discard the index

2017-07-12 Thread Brandon Williams
On 07/11, Jonathan Nieder wrote: > Brandon Williams wrote: > > > Have 'repo_read_index()' behave more like the other read_index family of > > functions and don't discard the index if it has already been populated. > > > > Signed-off-by: Brandon Will

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-12 Thread Brandon Williams
On 07/11, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > Have the index state which is stored in 'the_repository' be a pointer to > > the in-core instead 'the_index'. This makes it easier to begin > > transitioning m

Re: [PATCH 2/3] setup: have the_repository use the_index

2017-07-12 Thread Brandon Williams
On 07/11, Junio C Hamano wrote: > Brandon Williams writes: > > > Have the index state which is stored in 'the_repository' be a pointer to > > the in-core instead 'the_index'. This makes it easier to begin > > transitioning more parts of the code

Re: [PATCH 0/3] Convert grep to recurse in-process

2017-07-12 Thread Brandon Williams
On 07/12, Jeff King wrote: > On Tue, Jul 11, 2017 at 03:04:05PM -0700, Brandon Williams wrote: > > > This series utilizes the new 'struct repository' in order to convert grep > > to be > > able to recurse into submodules in-process much like how ls-files w

Re: [PATCH 3/3] grep: recurse in-process using 'struct repository'

2017-07-12 Thread Brandon Williams
On 07/11, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > Convert grep to use 'struct repository' which enables recursing into > > submodules to be handled in-process. > > \o/ > > This will be even nicer with the chang

Re: [PATCH 3/3] grep: recurse in-process using 'struct repository'

2017-07-12 Thread Brandon Williams
On 07/11, Jacob Keller wrote: > On Tue, Jul 11, 2017 at 3:04 PM, Brandon Williams wrote: > > Convert grep to use 'struct repository' which enables recursing into > > submodules to be handled in-process. > > > > Signed-off-by: Brandon Williams > >

Re: [PATCH 3/3] grep: recurse in-process using 'struct repository'

2017-07-12 Thread Brandon Williams
On 07/11, Stefan Beller wrote: > On Tue, Jul 11, 2017 at 3:04 PM, Brandon Williams wrote: > > > + if (repo_submodule_init(&submodule, superproject, path)) > > + return 0; > > What happens if we go through the "return 0", do we rather w

Re: [PATCH] RFC: Introduce '.gitorderfile'

2017-07-13 Thread Brandon Williams
ossible options into the .gitmodules file, now that we established > a strong stance on not shipping a project-level .gitconfig. I'm trying to work on cleaning up the submodule-config a bit and as a result I should be able to make it more difficult to ship more project-level configurations in .gitmodules -- Brandon Williams

Re: [PATCH v2 00/13] object_id part 9

2017-07-14 Thread Brandon Williams
+++ > submodule-config.h | 12 +- > submodule.c | 32 +++--- > submodule.h | 2 +- > t/helper/test-submodule-config.c | 10 +- > transport-helper.c | 2 +- > 39 files changed, 351 insertions(+), 360 deletions(-) > -- Brandon Williams

[PATCH v2 3/3] grep: recurse in-process using 'struct repository'

2017-07-14 Thread Brandon Williams
Convert grep to use 'struct repository' which enables recursing into submodules to be handled in-process. Signed-off-by: Brandon Williams --- Documentation/git-grep.txt | 7 - builtin/grep.c | 396 ++--- cache.h

[PATCH v2 2/3] repository: have the_repository use the_index

2017-07-14 Thread Brandon Williams
Have the index state which is stored in 'the_repository' be a pointer to the in-core index 'the_index'. This makes it easier to begin transitioning more parts of the code base to operate on a 'struct repository'. Signed-off-by: Brandon Williams --- repository

[PATCH v2 1/3] repo_read_index: don't discard the index

2017-07-14 Thread Brandon Williams
dindex.xxx */ if (istate->initialized) return istate->cache_nr; Signed-off-by: Brandon Williams --- repository.c | 2 -- repository.h | 8 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/repository.c b/repository.c index edca90740..8e60af1d5 100644 --- a/reposit

[PATCH v2 0/3] Convert grep to recurse in-process

2017-07-14 Thread Brandon Williams
is is done as a static initializer. Brandon Williams (3): repo_read_index: don't discard the index repository: have the_repository use the_index grep: recurse in-process using 'struct repository' Documentation/git-grep.txt | 7 - built

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

2018-01-25 Thread Brandon Williams
ned-off-by: Brandon Williams --- builtin/fetch-pack.c | 16 +++- builtin/send-pack.c | 17 +++-- connect.c| 27 ++- connect.h| 3 +++ remote-curl.c| 20 ++-- remote.h | 5 +++-- transport.c

[PATCH v2 03/27] pkt-line: add delim packet support

2018-01-25 Thread Brandon Williams
eserved to indicate the end of a response. Signed-off-by: Brandon Williams --- 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 +91,12 @@ void pa

[PATCH v2 04/27] upload-pack: convert to a builtin

2018-01-25 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 --- Makefile | 3 +- builtin.h | 1 + builtin/upload-pack.c | 67 +++ git.c

[PATCH v2 01/27] pkt-line: introduce packet_read_with_status

2018-01-25 Thread Brandon Williams
_status' type. This allows for easily identifying 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 --- pkt-line.c | 57 +++-- pkt-line

[PATCH v2 07/27] connect: convert get_remote_heads to use struct packet_reader

2018-01-25 Thread Brandon Williams
st line without consuming 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 --- connect.c | 174 ++-

[PATCH v2 02/27] pkt-line: introduce struct packet_reader

2018-01-25 Thread Brandon Williams
enables 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 --- pkt-line.c | 59 ++

[PATCH v2 00/27] protocol version 2

2018-01-25 Thread Brandon Williams
7;t supported yet. I'm working on it and it can be either added to v2 by default if people think it needs to be in there from the start, or we can add it as a capability at a later point. Series can also be found on on github: https://github.com/bmwill/git/tree/protocol-v2

[PATCH v2 06/27] transport: use get_refs_via_connect to get refs

2018-01-25 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 --- transport.c | 18 -- 1 file changed, 4 i

[PATCH v2 09/27] transport: store protocol version

2018-01-25 Thread Brandon Williams
ned-off-by: Brandon Williams --- 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_transport_data {

[PATCH v2 23/27] transport-helper: refactor process_connect_service

2018-01-25 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 Will

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

2018-01-25 Thread Brandon Williams
fs it sends based on the sent patterns. Signed-off-by: Brandon Williams --- 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 index

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

2018-01-25 Thread Brandon Williams
based on provided ref-patterns. Signed-off-by: Brandon Williams --- Documentation/technical/protocol-v2.txt | 32 + Makefile| 1 + ls-refs.c | 96 ++ ls-refs.h | 9

[PATCH v2 26/27] remote-curl: create copy of the service name

2018-01-25 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 --- remote-curl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/remote-curl.

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

2018-01-25 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 --- builtin/upload-pack.c | 10 ++-- connect.c

[PATCH v2 22/27] transport-helper: remove name parameter

2018-01-25 Thread Brandon Williams
was removed the parameter was no longer necessary but wasn't removed. Clean up 'recvline_fh()' parameter list by removing the 'name' parameter. Signed-off-by: Brandon Williams --- transport-helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t

[PATCH v2 25/27] pkt-line: add packet_buf_write_len function

2018-01-25 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 --- pkt-line.c | 16 pkt-line.h | 1 + 2 files changed, 17 inserti

[PATCH v2 18/27] fetch: pass ref patterns when fetching

2018-01-25 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: Brando

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

2018-01-25 Thread Brandon Williams
Convert 'transport_get_remote_refs()' to optionally take a list of ref patterns. Signed-off-by: Brandon Williams --- builtin/clone.c | 2 +- builtin/fetch.c | 4 ++-- builtin/ls-remote.c | 2 +- builtin/remote.c| 2 +- transport.c | 7 +-- transport.h

[PATCH v2 24/27] transport-helper: introduce stateless-connect

2018-01-25 Thread Brandon Williams
ort. If a stateless 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 --- transport-helper.c | 8 ++

[PATCH v2 27/27] remote-curl: implement stateless-connect command

2018-01-25 Thread Brandon Williams
as a pass through to convert requests to http. Signed-off-by: Brandon Williams --- remote-curl.c | 185 - t/t5702-protocol-v2.sh | 41 +++ 2 files changed, 224 insertions(+), 2 deletions(-) diff --git a/remote-curl.c b/remote-cu

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

2018-01-25 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 ---

[PATCH v2 12/27] serve: introduce git-serve

2018-01-25 Thread Brandon Williams
t 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 --- .gitignore | 1 + Documentation/technical/protocol-v2.txt | 117 +++ Mak

[PATCH v2 19/27] push: pass ref patterns when pushing

2018-01-25 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 --- transp

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

2018-01-25 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 --- builtin/fetch-pack.c | 3 +++ builtin/receive-pack.c | 6 ++ builtin/send-pack.c| 3 +++ builtin/upload-p

[PATCH v2 11/27] test-pkt-line: introduce a packet-line test helper

2018-01-25 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 --- Makefile | 1 + t/helper/test-pkt-line.c | 62 2 files

[PATCH v2 20/27] upload-pack: introduce fetch server command

2018-01-25 Thread Brandon Williams
Introduce the 'fetch' server command. Signed-off-by: Brandon Williams --- Documentation/technical/protocol-v2.txt | 121 + serve.c | 2 + t/t5701-git-serve.sh| 1 + upload-pack.c

[PATCH v2 05/27] upload-pack: factor out processing lines

2018-01-25 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 -

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

2018-01-25 Thread Brandon Williams
When communicating with a v2 server, perform a fetch by requesting the 'fetch' command. Signed-off-by: Brandon Williams --- builtin/fetch-pack.c | 2 +- fetch-pack.c | 277 - fetch-pack.h | 4 +- t/t5702-prot

Re: [PATCH v2 05/27] upload-pack: factor out processing lines

2018-01-26 Thread Brandon Williams
On 01/26, Stefan Beller wrote: > On Thu, Jan 25, 2018 at 3:58 PM, Brandon Williams wrote: > > 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

Re: Shawn Pearce has died

2018-01-29 Thread Brandon Williams
consistently smart, hard-working, > funny, and just overall pleasant to work with. I'll miss him. > > -Peff -- Brandon Williams

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

2018-01-29 Thread Brandon Williams
mpile using a c++ compiler. I don't know if this is something the community still wants to move towards, but if this is something people are still interested in, and this series is wanted, then we can keep doing these sort of conversions in chunks slowly. Brandon Williams (37): object_info

[PATCH 14/37] combine-diff: 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 --- combine-diff.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/combine-diff.c b/combine-diff.c index bc08c4c5b

[PATCH 17/37] diff: 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 --- diff.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/diff.c b/diff.c index d682d0d1f..d49732b3b 100644

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

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 --- builtin/cat-file.c | 2 +- builtin/diff-tree.c| 2 +- builtin/fast-export.c | 8

[PATCH 19/37] entry: 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 --- entry.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/entry.c b/entry.c index 30211447a

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

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 --- builtin/rev-parse.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/builtin/rev-parse.c b

[PATCH 18/37] diffcore-delta: 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 --- diffcore-delta.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/diffcore-delta.c b/diffcore-delta.c index

[PATCH 03/37] blame: rename 'this' 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 --- blame.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/blame.c b/blame.c index 2893f3c10

[PATCH 07/37] apply: rename 'try' 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 --- apply.c | 68 - 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/apply.c

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

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 --- builtin/cat-file.c | 2 +- cache.h| 2 +- packfile.c | 6 +++--- sha1_file.c| 10 +- 4 files changed, 10

[PATCH 30/37] init-db: rename 'template' 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 --- builtin/init-db.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/builtin/init-db.c b/builtin/init

[PATCH 26/37] split-index: 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 --- split-index.c | 10 +- split-index.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/split-index.c b/split-index.c index

[PATCH 24/37] ref-filter: 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 --- ref-filter.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 9dae6cfe3..99a45beb1

[PATCH 08/37] apply: 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 --- apply.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/apply.c b/apply.c index 071f653c6

[PATCH 09/37] checkout: 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 --- builtin/checkout.c | 138 ++--- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/builtin

[PATCH 04/37] pack-objects: rename 'this' 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 --- builtin/pack-objects.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index

[PATCH 31/37] environment: rename 'template' 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 --- cache.h | 2 +- environment.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cache.h b/cache.h index

[PATCH 23/37] read-cache: 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 --- read-cache.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/read-cache.c b/read-cache.c

[PATCH 22/37] line-log: 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 --- line-log.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/line-log.c b/line

[PATCH 06/37] diff: rename 'this' 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 --- diff.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/diff.c b/diff.c index 0a9a0cdf1..d682d0d1f 100644 --- a/diff.c +++ b

[PATCH 32/37] diff: rename 'template' 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 --- diff.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/diff.c b/diff.c index d49732b3b..142a633e1 100644 --- a/diff.c

<    12   13   14   15   16   17   18   19   20   21   >