[PATCH 30/35] send-pack: store refspecs in a struct refspec

2018-05-14 Thread Brandon Williams
Convert send-pack.c to store refspecs in a 'struct refspec' instead of as an array of 'const char *'. Signed-off-by: Brandon Williams --- builtin/send-pack.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/builtin/send-pack.c b

Re: [PATCH 01/35] refspec: move refspec parsing logic into its own file

2018-05-15 Thread Brandon Williams
On 05/15, Junio C Hamano wrote: > Brandon Williams writes: > > > In preperation for performing a refactor on refspec related code, move > > Preparation? Oops, I'll fix that. -- Brandon Williams

Re: [PATCH 35/35] submodule: convert push_unpushed_submodules to take a struct refspec

2018-05-15 Thread Brandon Williams
On 05/15, Ævar Arnfjörð Bjarmason wrote: > > On Mon, May 14 2018, Brandon Williams wrote: > > > Convert 'push_unpushed_submodules()' to take a 'struct refspec' as a > > parameter instead of an array of 'const char *'. > > [...] >

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Brandon Williams
; > for (nr = 0; nr < repo->index->cache_nr; nr++) { > const struct cache_entry *ce = repo->index->cache[nr]; > -- > 2.17.0.582.gccdcbd54c44.dirty > -- Brandon Williams

Re: [PATCH 14/35] remote: convert fetch refspecs to struct refspec

2018-05-15 Thread Brandon Williams
On 05/15, Ævar Arnfjörð Bjarmason wrote: > > On Mon, May 14 2018, Brandon Williams wrote: > > > void add_prune_tags_to_fetch_refspec(struct remote *remote) > > { > > - int nr = remote->fetch_refspec_nr; > > - int bufsize = nr + 1; > >

Re: [PATCH 00/35] refactoring refspecs

2018-05-15 Thread Brandon Williams
On 05/15, Ævar Arnfjörð Bjarmason wrote: > > On Mon, May 14 2018, Brandon Williams wrote: > > > When working on protocol v2 I noticed that working with refspecs was a > > little difficult because of the various api's that existed. Some > > functions expected

Re: [PATCH 03/35] refspec: rename struct refspec to struct refspec_item

2018-05-15 Thread Brandon Williams
On 05/15, Junio C Hamano wrote: > Brandon Williams writes: > > > In preperation for introducing an abstraction around a collection of > > refspecs (much like how a 'struct pathspec' is a collection of 'struct > > pathspec_item's) rename the existing

Re: [PATCH 04/35] refspec: introduce struct refspec

2018-05-15 Thread Brandon Williams
On 05/15, Junio C Hamano wrote: > Brandon Williams writes: > > > diff --git a/refspec.h b/refspec.h > > index 173cea882..f6fb251f3 100644 > > --- a/refspec.h > > +++ b/refspec.h > > @@ -20,4 +20,29 @@ struct refspec_item *parse_push_refspec(int n

Re: [PATCH] refspec.h: reinstate 'extern' to fix sparse warning

2018-05-16 Thread Brandon Williams
/refspec.h > @@ -2,7 +2,7 @@ > #define REFSPEC_H > > #define TAG_REFSPEC "refs/tags/*:refs/tags/*" > -const struct refspec_item *tag_refspec; > +extern const struct refspec_item *tag_refspec; > > struct refspec_item { > unsigned force : 1; > -- > 2.17.0 -- Brandon Williams

Re: [PATCH 11/11] read_cache: convert most calls to repo_read_index_or_die

2018-05-16 Thread Brandon Williams
ACTION" > > @@ -432,7 +433,7 @@ static int fast_forward_to(const struct object_id *to, > const struct object_id *f > struct strbuf sb = STRBUF_INIT; > struct strbuf err = STRBUF_INIT; > > - read_cache(); > + repo_read_index_or_die(the_repository); > if (checkout_fast_forward(from, to, 1)) > return -1; /* the callee should have complained already */ > > @@ -489,7 +490,7 @@ static int do_recursive_merge(struct commit *base, struct > commit *next, > if (hold_locked_index(&index_lock, LOCK_REPORT_ON_ERROR) < 0) > return -1; > > - read_cache(); > + repo_read_index_or_die(the_repository); > > init_merge_options(&o); > o.ancestor = base ? base_label : "(empty tree)"; > diff --git a/sha1-name.c b/sha1-name.c > index 5b93bf8da36..83d5f945cf1 100644 > --- a/sha1-name.c > +++ b/sha1-name.c > @@ -1639,7 +1639,7 @@ static int get_oid_with_context_1(const char *name, > oc->path = xstrdup(cp); > > if (!active_cache) > - read_cache(); > + repo_read_index_or_die(the_repository); > pos = cache_name_pos(cp, namelen); > if (pos < 0) > pos = -pos - 1; > -- > 2.17.0.582.gccdcbd54c44.dirty > -- Brandon Williams

[PATCH v2 05/36] refspec: convert valid_fetch_refspec to use parse_refspec

2018-05-16 Thread Brandon Williams
Convert 'valid_fetch_refspec()' to use the new 'parse_refspec()' function to only parse a single refspec and eliminate an allocation. Signed-off-by: Brandon Williams --- refspec.c | 17 - refspec.h | 3 ++- 2 files changed, 10 insertions(+), 10 deleti

[PATCH v2 06/36] submodule--helper: convert push_check to use struct refspec

2018-05-16 Thread Brandon Williams
Convert 'push_check()' to use 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/submodule--helper.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index c0c4db007..88

[PATCH v2 00/36] refactoring refspecs

2018-05-16 Thread Brandon Williams
Changes in v2: * added missing extern keyword in the first patch * reordered patch 2 and 3 and updated some comments to be clearer. * fixed some memory leaks * squashed in some changes recommended by Aevar Brandon Williams (36): refspec: move refspec parsing logic into its own file

[PATCH v2 04/36] refspec: introduce struct refspec

2018-05-16 Thread Brandon Williams
sed to facilitate the migration to using this new abstraction throughout the code base. Signed-off-by: Brandon Williams --- refspec.c | 64 +++ refspec.h | 25 ++ 2 files changed, 89 insertions(+) diff --git a/refspec.c b/ref

[PATCH v2 07/36] pull: convert get_tracking_branch to use refspec_item_init

2018-05-16 Thread Brandon Williams
Convert 'get_tracking_branch()' to use 'refspec_item_init()' instead of the old 'parse_fetch_refspec()' function. Signed-off-by: Brandon Williams --- builtin/pull.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/pull.c b/

[PATCH v2 03/36] refspec: factor out parsing a single refspec

2018-05-16 Thread Brandon Williams
Factor out the logic which parses a single refspec into its own function. This makes it easier to reuse this logic in a future patch. Signed-off-by: Brandon Williams --- refspec.c | 195 +- 1 file changed, 104 insertions(+), 91 deletions

[PATCH v2 01/36] refspec: move refspec parsing logic into its own file

2018-05-16 Thread Brandon Williams
In preparation for performing a refactor on refspec related code, move the refspec parsing logic into its own file. Signed-off-by: Brandon Williams --- Makefile| 1 + branch.c| 1 + builtin/clone.c | 1 + builtin/fast-export.c

[PATCH v2 10/36] remote: convert match_push_refs to use struct refspec

2018-05-16 Thread Brandon Williams
Convert 'match_push_refs()' to use struct refspec. Signed-off-by: Brandon Williams --- remote.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/remote.c b/remote.c index 191855118..bce6e7ce4 100644 --- a/remote.c +++ b/remote.c @@ -1312,7 +131

[PATCH v2 02/36] refspec: rename struct refspec to struct refspec_item

2018-05-16 Thread Brandon Williams
In preparation for introducing an abstraction around a collection of refspecs (much like how a 'struct pathspec' is a collection of 'struct pathspec_item's) rename the existing 'struct refspec' to 'struct refspec_item'. Signed-off-by: Brandon William

[PATCH v2 11/36] clone: convert cmd_clone to use refspec_item_init

2018-05-16 Thread Brandon Williams
Convert 'cmd_clone()' to use 'refspec_item_init()' instead of relying on the old 'parse_fetch_refspec()' to initialize a single refspec item. Signed-off-by: Brandon Williams --- builtin/clone.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-)

[PATCH v2 13/36] remote: convert push refspecs to struct refspec

2018-05-16 Thread Brandon Williams
Convert the set of push refspecs stored in 'struct remote' to use 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/push.c | 10 +- builtin/remote.c | 14 +++--- remote.c | 35 ++- remote.h

[PATCH v2 18/36] fetch: convert refmap to use struct refspec

2018-05-16 Thread Brandon Williams
Convert the refmap in builtin/fetch.c to be stored in a 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index 18704c6cd..6b909cd5b 100644 ---

[PATCH v2 16/36] transport-helper: convert to use struct refspec

2018-05-16 Thread Brandon Williams
Convert the refspecs in transport-helper.c to be stored in a 'struct refspec'. Signed-off-by: Brandon Williams --- transport-helper.c | 38 -- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/transport-helper.c b/transport-help

[PATCH v2 12/36] fast-export: convert to use struct refspec

2018-05-16 Thread Brandon Williams
Convert fast-export to use 'struct refspec' instead of using a list of refspec_item's. Signed-off-by: Brandon Williams --- builtin/fast-export.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/builtin/fast-export.c b/builtin/fast

[PATCH v2 14/36] remote: convert fetch refspecs to struct refspec

2018-05-16 Thread Brandon Williams
Convert the set of fetch refspecs stored in 'struct remote' to use 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 20 ++-- builtin/remote.c | 18 +- remote.c | 38 -- r

[PATCH v2 20/36] fetch: convert do_fetch to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'do_fetch()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/fetch.c b/b

[PATCH v2 09/36] remote: convert check_push_refs to use struct refspec

2018-05-16 Thread Brandon Williams
Convert 'check_push_refs()' to use 'struct refspec'. Signed-off-by: Brandon Williams --- remote.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/remote.c b/remote.c index 89820c476..191855118 100644 --- a/remote.c +++ b/remote.c @@ -1282,1

[PATCH v2 19/36] refspec: remove the deprecated functions

2018-05-16 Thread Brandon Williams
Now that there are no callers of 'parse_push_refspec()', 'parse_fetch_refspec()', and 'free_refspec()', remove these functions. Signed-off-by: Brandon Williams --- refspec.c | 49 - refspec.h | 5 - 2 files

[PATCH v2 17/36] fetch: convert fetch_one to use struct refspec

2018-05-16 Thread Brandon Williams
Convert 'fetch_one()' to use 'struct refspec'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 46 +++--- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index 7a1637d35..18

[PATCH v2 28/36] push: check for errors earlier

2018-05-16 Thread Brandon Williams
Move the error checking for using the "--mirror", "--all", and "--tags" options earlier and explicitly check for the presence of the flags instead of checking for a side-effect of the flag. Signed-off-by: Brandon Williams --- builtin/push.c | 31 ++---

[PATCH v2 15/36] remote: remove add_prune_tags_to_fetch_refspec

2018-05-16 Thread Brandon Williams
Remove 'add_prune_tags_to_fetch_refspec()' function and instead have the only caller directly add the tag refspec using 'refspec_append()'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 2 +- remote.c| 5 - remote.h| 2 -- 3 files changed, 1 inser

[PATCH v2 27/36] remote: convert match_explicit_refs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'match_explicit_refs()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- remote.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/remote.c b/remote.c ind

[PATCH v2 26/36] remote: convert get_ref_match to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'get_ref_match()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- remote.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/remot

[PATCH v2 24/36] remote: convert apply_refspecs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'apply_refspecs()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fast-export.c | 2 +- remote.c | 15 ++- remote.h | 3 +-- transp

[PATCH v2 21/36] fetch: convert get_ref_map to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'get_ref_map()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 43 --- 1 file changed, 20 insertions(+), 23 deletions(-)

[PATCH v2 25/36] remote: convert query_refspecs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'query_refspecs()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/push.c | 3 +-- remote.c | 10 +- remote.h | 2 +- 3 files changed, 7 insertions(+)

[PATCH v2 35/36] remote: convert check_push_refs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'check_push_refs()' to take a 'struct refspec' as a parameter instead of an array of 'const char *'. Signed-off-by: Brandon Williams --- remote.c| 14 +- remote.h| 2 +- transport.c | 2 +- 3 files changed, 7 insertions(+), 11 deletio

[PATCH v2 34/36] remote: convert match_push_refs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'match_push_refs()' to take a 'struct refspec' as a parameter instead of an array of 'const char *'. Signed-off-by: Brandon Williams --- builtin/remote.c| 3 +-- builtin/send-pack.c | 2 +- http-push.c | 3 +-- remote.c| 21 +

[PATCH v2 33/36] http-push: store refspecs in a struct refspec

2018-05-16 Thread Brandon Williams
Convert http-push.c to store refspecs in a 'struct refspec' instead of in an array of 'const char *'. Signed-off-by: Brandon Williams --- http-push.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/http-push.c b/http-push.c index f308ce0

[PATCH v2 32/36] transport: remove transport_verify_remote_names

2018-05-16 Thread Brandon Williams
Remove 'transprot_verify_remote_names()' because all callers have migrated to using 'struct refspec' which performs the same checks in 'parse_refspec()'. Signed-off-by: Brandon Williams --- builtin/send-pack.c | 2 -- transport.c | 24

[PATCH v2 36/36] submodule: convert push_unpushed_submodules to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'push_unpushed_submodules()' to take a 'struct refspec' as a parameter instead of an array of 'const char *'. Signed-off-by: Brandon Williams --- submodule.c | 19 +-- submodule.h | 3 ++- transport.c | 2 +- 3 files changed, 12 insert

[PATCH v2 30/36] transport: convert transport_push to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'transport_push()' to take a 'struct refspec' as a parameter instead of an array of strings which represent refspecs. Signed-off-by: Brandon Williams --- builtin/push.c | 3 +-- transport.c| 17 +++-- transport.h| 2 +- 3 files changed,

[PATCH v2 29/36] push: convert to use struct refspec

2018-05-16 Thread Brandon Williams
Convert the refspecs in builtin/push.c to be stored in a 'struct refspec' instead of being stored in a list of 'struct refspec_item's. Signed-off-by: Brandon Williams --- builtin/push.c | 38 +++--- 1 file changed, 15 insertions(+), 23 deleti

[PATCH v2 23/36] remote: convert get_stale_heads to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'get_stale_heads()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 2 +- builtin/remote.c | 3 +-- remote.c | 18 +- remote.h

[PATCH v2 31/36] send-pack: store refspecs in a struct refspec

2018-05-16 Thread Brandon Williams
Convert send-pack.c to store refspecs in a 'struct refspec' instead of as an array of 'const char *'. Signed-off-by: Brandon Williams --- builtin/send-pack.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/builtin/send-pack.c b

[PATCH v2 08/36] transport: convert transport_push to use struct refspec

2018-05-16 Thread Brandon Williams
Convert the logic in 'transport_push()' which calculates a list of ref-prefixes to use 'struct refspec'. Signed-off-by: Brandon Williams --- transport.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/transport.c b/transport.c index

[PATCH v2 22/36] fetch: convert prune_refs to take a struct refspec

2018-05-16 Thread Brandon Williams
Convert 'prune_refs()' to take a 'struct refspec' as a parameter instead of a list of 'struct refspec_item'. Signed-off-by: Brandon Williams --- builtin/fetch.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/builtin/fetch.c b/b

[PATCH 2/2] fetch: generate ref-prefixes when using a configured refspec

2018-05-16 Thread Brandon Williams
Teach fetch to generate ref-prefixes, to be used for server-side filtering of the ref-advertisement, based on the configured fetch refspec ('remote..fetch') when no user provided refspec exists. Signed-off-by: Brandon Williams --- builtin/fetch.c| 10 +- t/t5702-prot

[PATCH 0/2] generating ref-prefixes for configured refspecs

2018-05-16 Thread Brandon Williams
short series extends this to generate the ref-prefixes even for the refspecs which are configured in 'remote..fetch'. This series is based on the v2 of the refspec refactoring series. Brandon Williams (2): refspec: consolidate ref-prefix generation logic fetch: generate ref-prefix

[PATCH 1/2] refspec: consolidate ref-prefix generation logic

2018-05-16 Thread Brandon Williams
roughly the same so lets consolidate this logic and make it general enough that it can be used for both the push and fetch cases. Signed-off-by: Brandon Williams --- builtin/fetch.c | 13 + refspec.c | 29 + refspec.h | 4 transport.c | 21

Re: [PATCH 02/11] repository: introduce repo_read_index_or_die

2018-05-21 Thread Brandon Williams
ries as we want to move away from _die() in top level code but this > series moves more towards it. I've heard every once in a while that we want to move toward this but I don't believe there is an actual effort along those lines just yet. For that to be the case we would need a clearly defined error handling methodology (aside from the existing "die"ing behavior), which we don't currently have. > > I don't know. > > Stefan -- Brandon Williams

Re: [PATCH v2 02/18] Add a new builtin: branch-diff

2018-05-21 Thread Brandon Williams
l of the discussion but from what I can tell the point of this command is to generate a diff based on two different versions of a series, so why not call it 'series-diff'? :) -- Brandon Williams

[PATCH 1/2] remote-curl: accept all encoding supported by curl

2018-05-21 Thread Brandon Williams
" header containing only the encoding methods curl supports. Signed-off-by: Brandon Williams --- http.c | 2 +- remote-curl.c | 2 +- t/t5551-http-fetch-smart.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/http.c b/http.c inde

[PATCH 2/2] remote-curl: accept compressed responses with protocol v2

2018-05-21 Thread Brandon Williams
Configure curl to accept compressed responses when using protocol v2 by setting `CURLOPT_ENCODING` to "", which indicates that curl should send an "Accept-Encoding" header with all supported compression encodings. Signed-off-by: Brandon Williams --- remote-curl.c | 1

Re: [PATCH 1/2] remote-curl: accept all encoding supported by curl

2018-05-22 Thread Brandon Williams
> and typically a HTTP client doesn't know which compression methods the > server offers. Not sure this is actually true to the same extent for git. > > -- > > / daniel.haxx.se -- Brandon Williams

[PATCH v2 1/2] remote-curl: accept all encodings supported by curl

2018-05-22 Thread Brandon Williams
ng to verify that it supports the a requested encoding, instead set the curl option `CURLOPT_ENCODING` with an empty string indicating that curl should send an "Accept-Encoding" header containing only the encodings supported by curl. Reported-by: Anton Golubev Signed-off-by: Brandon Willia

[PATCH v2 2/2] remote-curl: accept compressed responses with protocol v2

2018-05-22 Thread Brandon Williams
Configure curl to accept compressed responses when using protocol v2 by setting `CURLOPT_ENCODING` to "", which indicates that curl should send an "Accept-Encoding" header with all supported compression encodings. Signed-off-by: Brandon Williams --- remote-curl.c | 1

[PATCH] config: document value 2 for protocol.version

2018-05-22 Thread Brandon Williams
Update the config documentation to note the value `2` as an acceptable value for the protocol.version config. Signed-off-by: Brandon Williams --- Documentation/config.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index a05a88fec

Re: Is origin/HEAD only being created on clone a bug? #leftoverbits

2018-05-29 Thread Brandon Williams
tly fetch most likely because its recorded as a symref locally which points at origin/master. This means that when you fetch origin/master, origin/HEAD will also but updated just because its locally a pointer to origin/master. With that said, yes we should probably fix this issue with fetch because I added symref support to protocol v2 so now symref information for refs other than HEAD can be sent across the wire but the client just throws that info away at the moment. -- Brandon Williams

Re: [PATCH] fetch: do not pass ref-prefixes for fetch by exact SHA1

2018-05-31 Thread Brandon Williams
Thanks for finding this, I don't know how I missed moving that bit over when factoring it out. Well I guess I sort of rewrote it and combined two pieces of logic so that's how. Anyway, this looks right and thanks for adding the test. On Thu, May 31, 2018 at 12:23 AM, Jonathan Nieder wrote: > Wh

Re: [GSoC][PATCH v5 2/3] t7407: test "submodule foreach --recursive" from subdirectory added

2017-05-26 Thread Brandon Williams
On 05/26, Prathamesh Chavan wrote: > Additional test cases added to the submodule-foreach test suite > to check the submodule foreach --recursive behavior from a > subdirectory as this was missing from the test suite. > > Helped-by: Brandon Williams > Mentored-by: Christian Cou

Re: [GSoC][PATCH v5 3/3] submodule: port subcommand foreach from shell to C

2017-05-26 Thread Brandon Williams
t use eval. But since in this patch, we are calling the > command in a separate shell itself for all values of argc, this case > is not considered separately. > > Both env variable $path and $sm_path were added since both are used in > tests in t7407. > > Helped-by: Brandon

Re: [GSoC][PATCH v5 3/3] submodule: port subcommand foreach from shell to C

2017-05-26 Thread Brandon Williams
much guarantee to fail. (I haven't tested it, though.) > > The correct fix can only be to rename this variable here and in > shell scripts that need the value that is set here. > > -- Hannes Nice catch, the only reason why this would have worked before was because it was a shell script before... -- Brandon Williams

Re: git push recurse.submodules behavior changed in 2.13

2017-05-30 Thread Brandon Williams
in such a > >> configuration would somehow break things, actively erroring out may > >> be a deliberate change) or not (i.e. an unintended regression). > >> > > > > Before the refspec was passed down into the submodules, > > we'd just invoke "git push" in the submodule assuming the user > > setup a remote tracking branch and a push strategy such that > > "git push" would do the right thing. > > And because the submodule is configured independently, it > > doesn't matter which branch you're on in the superproject. > > > > Looking at the test[1], you run "git push --recurse-submodules" > > without any remote/branch that was called out in the commit > > message[2] to not have changed. Is that understanding correct? > > > > Looking at the test cases of [2] we did not test for explicit > > "still works with no args given", though one could have expected > > we'd have a test for that already. :/ > > > > Thanks, > > Stefan -- Brandon Williams

Re: [WIP/RFC 00/23] repository object

2017-05-30 Thread Brandon Williams
odule work easier. I know I've only worked on the project for a short time but I already regret some of the submodule changes that I've made because they are straight up hacks which I want to eradicate sooner rather than later (just look at my patches to get 'git grep' to handle submodules...). I wasn't thinking about libgit2 and don't really haven't thought too much about the possibility of being in competition with that project. -- Brandon Williams

[PATCH 09/33] diff: convert get_stat_data to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- diff-lib.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/diff-lib.c b/diff-lib.c index 2982bf055..a3bc78162 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -264,12 +264,12 @@ static void diff_index_show_file

[PATCH 02/33] notes: convert internal parts to struct object_id

2017-05-30 Thread Brandon Williams
s (on Unix, "/"). While these constants are both 19 (one less than the number of bytes in the hash), distinguish them to make the code more understandable, and define them logically based on their intended purpose. Signed-off-by: brian m. carlson Signed-off-by: Brandon William

[PATCH 04/33] notes: make get_note return pointer to struct object_id

2017-05-30 Thread Brandon Williams
From: "brian m. carlson" Make get_note return a pointer to a const struct object_id. Add a defensive check to ensure we don't accidentally dereference a NULL pointer. Signed-off-by: brian m. carlson Signed-off-by: Brandon Williams --- builtin/notes.c | 22 +++---

[PATCH 07/33] notes: convert some accessor functions to struct object_id

2017-05-30 Thread Brandon Williams
From: "brian m. carlson" Convert add_note, get_note, and copy_note to take struct object_id. Signed-off-by: brian m. carlson Signed-off-by: Brandon Williams --- builtin/notes.c | 20 ++-- notes-cache.c| 4 ++-- notes-merge.c| 18 +- not

[PATCH 10/33] diff: convert diff_index_show_file to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- diff-lib.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/diff-lib.c b/diff-lib.c index a3bc78162..2c838aaf4 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -255,12 +255,12 @@ int run_diff_files(struct rev_info *revs, unsigned int

[PATCH 08/33] grep: convert to struct object_id

2017-05-30 Thread Brandon Williams
Convert the remaining parts of grep to use struct object_id. Signed-off-by: Brandon Williams --- builtin/grep.c | 22 +++--- cache.h| 7 +++ grep.c | 17 - grep.h | 2 +- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git

[PATCH 15/33] diff: convert reuse_worktree_file to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- diff.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/diff.c b/diff.c index e0c179f5f..084c8b2d0 100644 --- a/diff.c +++ b/diff.c @@ -2717,7 +2717,7 @@ void fill_filespec(struct diff_filespec *spec, const struct object_id *oid

[PATCH 14/33] diff: convert fill_filespec to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/blame.c | 2 +- builtin/diff.c| 4 ++-- combine-diff.c| 4 ++-- diff-lib.c| 2 +- diff-no-index.c | 2 +- diff.c| 16 diffcore-rename.c | 2 +- diffcore.h| 2 +- grep.c| 2

[PATCH 05/33] notes: convert format_display_notes to struct object_id

2017-05-30 Thread Brandon Williams
From: "brian m. carlson" Signed-off-by: brian m. carlson Signed-off-by: Brandon Williams --- log-tree.c | 2 +- notes.c| 8 notes.h| 2 +- revision.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/log-tree.c b/log-tree.c index a4ec11c2b.

[PATCH 00/33] object id conversion (grep and diff)

2017-05-30 Thread Brandon Williams
'struct object_id'. The remaining patches are to convert the grep and diff machinery to using 'struct object_id'. Brandon Williams (26): grep: convert to struct object_id diff: convert get_stat_data to struct object_id diff: convert diff_index_show_file to stru

[PATCH 06/33] builtin/notes: convert to struct object_id

2017-05-30 Thread Brandon Williams
From: "brian m. carlson" Convert most of the static functions to use struct object_id. In addition, convert copy_notes_for_rewrite and its callers. Signed-off-by: brian m. carlson Signed-off-by: Brandon Williams --- builtin/am.c | 2 +- builtin/commit.c | 2 +- built

[PATCH 21/33] tree-diff: convert diff_root_tree_sha1 to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/fast-export.c | 4 ++-- diff.h| 4 ++-- log-tree.c| 2 +- patch-ids.c | 2 +- tree-diff.c | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/builtin/fast-export.c b/builtin/fast

[PATCH 24/33] notes-merge: convert find_notes_merge_pair_ps to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- notes-merge.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/notes-merge.c b/notes-merge.c index be78f1954..55dbb3659 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -58,7 +58,7 @@ static int

[PATCH 01/33] notes: convert internal structures to struct object_id

2017-05-30 Thread Brandon Williams
key_sha1 + E1->key_oid.hash @@ struct leaf_node E1; @@ - E1.key_sha1 + E1.key_oid.hash @@ struct leaf_node *E1; @@ - E1->key_sha1 + E1->key_oid.hash @@ struct non_note E1; @@ - E1.sha1 + E1.oid.hash @@ struct non_note *E1; @@ - E1->sha1 + E1->oid.hash Signed-off-by: brian m. car

[PATCH 03/33] notes: convert for_each_note to struct object_id

2017-05-30 Thread Brandon Williams
From: "brian m. carlson" Convert for_each_note and each of the callbacks to use struct object_id. Signed-off-by: brian m. carlson Signed-off-by: Brandon Williams --- builtin/notes.c | 6 +++--- notes.c | 24 notes.h | 4 ++-- remote

[PATCH 19/33] combine-diff: convert diff_tree_combined to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/diff.c | 2 +- combine-diff.c | 10 +- diff.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/builtin/diff.c b/builtin/diff.c index b2d7c32cd..73b4ff3db 100644 --- a/builtin/diff.c +++ b/builtin/diff.c

[PATCH 25/33] notes-merge: convert verify_notes_filepair to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- notes-merge.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/notes-merge.c b/notes-merge.c index 55dbb3659..962e9b1bc 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -22,21 +22,21 @@ void init_notes_merge_options

[PATCH 30/33] tree-diff: convert diff_tree_paths to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- combine-diff.c | 10 +- diff.h | 4 ++-- tree-diff.c| 63 +- 3 files changed, 39 insertions(+), 38 deletions(-) diff --git a/combine-diff.c b/combine-diff.c index 04c4ae856

[PATCH 26/33] notes-merge: convert write_note_to_worktree to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- notes-merge.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/notes-merge.c b/notes-merge.c index 962e9b1bc..7d88857a8 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -292,11 +292,11 @@ static void

[PATCH 20/33] combine-diff: convert find_paths_* to struct object_id

2017-05-30 Thread Brandon Williams
Convert find_paths_generic and find_paths_multitree to use struct object_id. 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 84981df75..c82364510 100644 --- a/combine

[PATCH 29/33] tree-diff: convert try_to_follow_renames to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- tree-diff.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tree-diff.c b/tree-diff.c index fc020d76d..29e3f6144 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -577,7 +577,9 @@ static inline int diff_might_be_rename(void

[PATCH 18/33] diff: convert diff_flush_patch_id to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- diff.c | 12 ++-- diff.h | 2 +- patch-ids.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/diff.c b/diff.c index a8ceeb024..dd325e616 100644 --- a/diff.c +++ b/diff.c @@ -4584,7 +4584,7 @@ static void

[PATCH 23/33] notes-merge: convert merge_from_diffs to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- notes-merge.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/notes-merge.c b/notes-merge.c index 9dbf7f6a3..be78f1954 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -114,8 +114,8 @@ static struct

[PATCH 33/33] diff: rename diff_fill_sha1_info to diff_fill_oid_info

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- diff.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/diff.c b/diff.c index dd325e616..c758a0d73 100644 --- a/diff.c +++ b/diff.c @@ -3239,7 +3239,7 @@ static void run_diff_cmd(const char *pgm, fprintf(o

[PATCH 31/33] tree-diff: convert path_appendnew to object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- tree-diff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tree-diff.c b/tree-diff.c index 6a960f569..467e38172 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -132,7 +132,7 @@ static int emit_diff_first_parent_only(struct

[PATCH 22/33] notes-merge: convert notes_merge* to struct object_id

2017-05-30 Thread Brandon Williams
Convert notes_merge and notes_merge_commit to use struct object_id. Signed-off-by: Brandon Williams --- builtin/notes.c | 6 +++--- notes-merge.c | 58 - notes-merge.h | 12 ++-- 3 files changed, 38 insertions(+), 38

[PATCH 17/33] patch-ids: convert to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/log.c | 2 +- patch-ids.c | 20 ++-- patch-ids.h | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index a440601ef..6bdba3444 100644 --- a/builtin/log.c +++ b/builtin/log.c

[PATCH 13/33] diff: convert diff_change to struct object_id

2017-05-30 Thread Brandon Williams
Convert diff_change to take a struct object_id. In addition convert the function pointer type 'change_fn_t' to also take a struct object_id. Signed-off-by: Brandon Williams --- diff-lib.c | 4 ++-- diff.c | 14 +++--- diff.h | 13 ++--- revision.c | 6 ++

[PATCH 16/33] diff: finish conversion for prepare_temp_file to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 084c8b2d0..a8ceeb024 100644 --- a/diff.c +++ b/diff.c @@ -3030,13 +3030,13 @@ static struct diff_tempfile *prepare_temp_file(const char *name

[PATCH 32/33] diffcore-rename: use is_empty_blob_oid

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- diffcore-rename.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diffcore-rename.c b/diffcore-rename.c index 3d9719dad..03d1e8d40 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -464,7 +464,7 @@ void diffcore_rename(struct

[PATCH 28/33] builtin/diff-tree: cleanup references to sha1

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/diff-tree.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c index aef167619..8b26a66a9 100644 --- a/builtin/diff-tree.c +++ b/builtin/diff-tree.c @@ -7,7 +7,7 @@ static struct

[PATCH 27/33] diff-tree: convert diff_tree_sha1 to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- builtin/blame.c | 20 ++-- builtin/diff-tree.c | 8 +++- builtin/diff.c| 2 +- builtin/fast-export.c | 4 ++-- builtin/log.c | 6 +++--- builtin/merge.c | 2 +- combine-diff.c| 4 ++-- diff.h

[PATCH 11/33] diff: convert diff_addremove to struct object_id

2017-05-30 Thread Brandon Williams
Convert diff_addremove to take a struct object_id. In addtion convert the function pointer type 'add_remove_fn_t' to also take a struct object_id. Signed-off-by: Brandon Williams --- diff-lib.c | 6 +++--- diff.c | 8 diff.h | 8 revision.c | 4 ++-- t

[PATCH 12/33] diff: convert run_diff_files to struct object_id

2017-05-30 Thread Brandon Williams
Signed-off-by: Brandon Williams --- diff-lib.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/diff-lib.c b/diff-lib.c index 7984ff962..c82b07dc1 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -101,7 +101,7 @@ int run_diff_files(struct rev_info *revs, unsigned int

[PATCH 00/31] repository object

2017-05-31 Thread Brandon Williams
eciated. - Brandon Patches [01-14] -> Introducing the Repository object and migrating some state to be stored in 'the_repository'. Patches [15-31] -> Converting ls-files to use 'struct repo' in order to recurse submodules in-process.

<    9   10   11   12   13   14   15   16   17   18   >