Re: [ANNOUNCE] Git v2.16.0-rc0

2018-06-14 Thread Jeff King
On Thu, Jun 14, 2018 at 09:20:33PM -0700, Jonathan Nieder wrote: > What we've switched to is a versioned interface. By setting > GIT_SSH_VARIANT=simple, you are asking Git to promise to pass exactly > options. If Git has a new option it wants to pass (like the "-o > SendEnv" thing) but can

[PATCH] unpack-trees: do not fail reset because of unmerged skipped entry

2018-06-14 Thread Max Kirillov
After modify/delete merge conflict happens in a file skipped by sparse checkout, "git reset --merge", which implements the "--abort" actions, and "git reset --hard" fail with message "Entry * not uptodate. Cannot update sparse checkout." The reason is that the entry is verified in

RESEARCHERS

2018-06-14 Thread Sarah Paige
Greetings, We are contracted probate researchers. This is an investigation about a late client with whom you share the same surname; your assistance will be greatly appreciated. Are you aware of any investment made by such a person with us? Please clarify, EmaiL Reply to :

BUG: sequencer.c:795: root commit without message -- when rewording root commit

2018-06-14 Thread Todd Zullinger
Hi Johannes, I was splitting a repository tonight and ran 'rebase -i --root' to reword the initial commit. Then git died with 'BUG: sequencer.c:795: root commit without message.' A simple test case to show the failure: -- >8 -- diff --git a/t/t3404-rebase-interactive.sh

Re: [PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-14 Thread Jeff King
On Thu, Jun 14, 2018 at 10:25:03PM -0400, Eric Sunshine wrote: > The Makefile tweak NO_ICONV is meant to allow Git to be built without > iconv in case iconv is not installed or is otherwise dysfunctional. > However, NO_ICONV's disabling of iconv is incomplete and can incorrectly > allow "-liconv"

Re: [ANNOUNCE] Git v2.16.0-rc0

2018-06-14 Thread Jonathan Nieder
Hi, Jeff King wrote: > On Thu, Jun 14, 2018 at 11:55:22AM -0700, Jonathan Nieder wrote: >> Do you mean that it doesn't pass "-G" through, or that when using old >> versions of openssh that doesn't support "-G" the probing fails? > > It just doesn't pass "-G" through. Thanks. >> If the former,

[PATCH 4/3] ewah: adjust callers of ewah_read_mmap()

2018-06-14 Thread Jeff King
On Thu, Jun 14, 2018 at 11:28:50PM -0400, Jeff King wrote: > Yep. We also fail to check if we even have enough bytes to read the > buffer_size in the first place. > > Here are some patches. The first one fixes the problem you found. The > second one drops some dead code that has a related

[PATCH 3/3] ewah: drop ewah_serialize_native function

2018-06-14 Thread Jeff King
We don't call this function, and never have. The on-disk bitmap format uses network-byte-order integers, meaning that we cannot use the native-byte-order format written here. Let's drop it in the name of simplicity. Signed-off-by: Jeff King --- ewah/ewah_io.c | 26 --

[PATCH 2/3] ewah: drop ewah_deserialize function

2018-06-14 Thread Jeff King
We don't call this function, and in fact never have since it was added (at least not in iterations of the ewah patches that got merged). Instead we use ewah_read_mmap(). Let's drop the unused code. Note to anybody who later wants to resurrect this: it does not check for integer overflow in the

[PATCH 1/3] ewah_read_mmap: bounds-check mmap reads

2018-06-14 Thread Jeff King
The on-disk ewah format tells us how big the ewah data is, and we blindly read that much from the buffer without considering whether the mmap'd data is long enough, which can lead to out-of-bound reads. Let's make sure we have data available before reading it, both for the ewah header/footer as

Re: security: potential out-of-bound read at ewah_io.c |ewah_read_mmap|

2018-06-14 Thread Jeff King
On Fri, Jun 15, 2018 at 06:59:43AM +0800, Luat Nguyen wrote: > Recently, I’ve found a security issue related to out-of-bound read at > function named `ewah_read_mmap` Thanks, this is definitely a bug worth addressing. But note... > Assume that, an attacker can put malicious `./git/index` into

[PATCH] Makefile: make NO_ICONV really mean "no iconv"

2018-06-14 Thread Eric Sunshine
The Makefile tweak NO_ICONV is meant to allow Git to be built without iconv in case iconv is not installed or is otherwise dysfunctional. However, NO_ICONV's disabling of iconv is incomplete and can incorrectly allow "-liconv" to slip into the linker flags when NEEDS_LIBICONV is defined, which

security: potential out-of-bound read at ewah_io.c |ewah_read_mmap|

2018-06-14 Thread Luat Nguyen
Hi folks, Recently, I’ve found a security issue related to out-of-bound read at function named `ewah_read_mmap` Assume that, an attacker can put malicious `./git/index` into a repo by somehow. Since there is lack of check whether the remaining size of `ptr`is equal to `buffer_size` or not.

Re: [PATCH v2 7/8] fetch-pack: put shallow info in output parameter

2018-06-14 Thread Jonathan Tan
> @@ -1122,6 +1124,7 @@ static int do_fetch(struct transport *transport, > int autotags = (transport->remote->fetch_tags == 1); > int retcode = 0; > const struct ref *remote_refs; > + struct ref *new_remote_refs = NULL; Above, you use the name "updated_remote_refs" - it's

[PATCH v3 5/7] fetch-pack: make negotiation-related vars local

2018-06-14 Thread Jonathan Tan
Reduce the number of global variables by making the priority queue and the count of non-common commits in it local, passing them as a struct to various functions where necessary. This also helps in the case that fetch_pack() is invoked twice in the same process (when tag following is required

[PATCH v3 2/7] fetch-pack: clear marks before re-marking

2018-06-14 Thread Jonathan Tan
If tag following is required when using a transport that does not support tag following, fetch_pack() will be invoked twice in the same process, necessitating a clearing of the object flags used by fetch_pack() sometime during the second invocation. This is currently done in find_common(), which

[PATCH v3 3/7] fetch-pack: directly end negotiation if ACK ready

2018-06-14 Thread Jonathan Tan
When "ACK %s ready" is received, find_common() clears rev_list in an attempt to stop further "have" lines from being sent [1]. It is much more readable to explicitly break from the loop instead. So explicitly break from the loop, and make the clearing of the rev_list happen unconditionally. [1]

[PATCH v3 7/7] fetch-pack: introduce negotiator API

2018-06-14 Thread Jonathan Tan
Introduce the new files fetch-negotiator.{h,c}, which contains an API behind which the details of negotiation are abstracted. Currently, only one algorithm is available: the existing one. This patch is written to be easily reviewed: static functions are moved verbatim from fetch-pack.c to

[PATCH v3 4/7] fetch-pack: use ref adv. to prune "have" sent

2018-06-14 Thread Jonathan Tan
In negotiation using protocol v2, fetch-pack sometimes does not make full use of the information obtained in the ref advertisement: specifically, that if the server advertises a commit that the client also has, the client never needs to inform the server that it has the commit's parents, since it

[PATCH v3 0/7] Refactor fetch negotiation into its own API

2018-06-14 Thread Jonathan Tan
Thanks, Brandon and Junio, for your comments. Updates since v2: - nothing new in patches 1 and 2 - patch 3: now clear priority queue unconditionally once we are done with it (as requested by Brandon in a comment for a later patch) - patch 4: updated commit message to not mention

[PATCH v3 1/7] fetch-pack: split up everything_local()

2018-06-14 Thread Jonathan Tan
The function everything_local(), despite its name, also (1) marks commits as COMPLETE and COMMON_REF and (2) invokes filter_refs() as important side effects. Extract (1) into its own function (mark_complete_and_common_ref()) and remove (2). The restoring of save_commit_buffer, which was

[PATCH v3 6/7] fetch-pack: move common check and marking together

2018-06-14 Thread Jonathan Tan
When receiving 'ACK continue' for a common commit, check if the commit was already known to be common and mark it as such if not up front. This should make future refactoring of how the information about common commits is stored more straightforward. No visible change intended. Signed-off-by:

Is NO_ICONV misnamed or is it broken?

2018-06-14 Thread Mahmoud Al-Qudsi
Hello list, With regards to the Makefile define/variable `NO_ICONV` - the Makefile comments imply that it should be used if "your libc doesn't properly support iconv," which could mean anything from "a patch will be applied" to "iconv won't be used." Based off the name of the varibale, the

Re: OAuth2 support in git?

2018-06-14 Thread brian m. carlson
On Thu, Jun 14, 2018 at 11:15:07AM -0400, Jeff King wrote: > On Thu, Jun 14, 2018 at 10:13:42AM +, brian m. carlson wrote: > > There isn't any support for Bearer authentication in Git. For HTTP, we > > use libcurl, which doesn't provide this natively. While it could in > > theory be added,

Re: (Bug report + fix) gitk "IgnCase" search doesn't ignore case

2018-06-14 Thread Eric Sunshine
On Thu, Jun 14, 2018 at 02:53:03PM +0200, Juan Navarro wrote: > Gitk "find commit" search function doesn't follow the "IgnCase" option that > is selectable with a combo selector on the right side of the window; it > should be searching in a case-insensitive way, but it doesn't. > > Steps to

Re: [PATCH v2 05/31] tree: add repository argument to lookup_tree

2018-06-14 Thread Stefan Beller
On Thu, Jun 14, 2018 at 12:33 PM Derrick Stolee wrote: > > The 'tree' member of 'struct commit' was renamed to 'maybe_tree'. > > Resolving the merge was not very simple. I have a working merge > available on GitHub [1] as commit 99a899f7c12ef73840dbe79c71acb11034d707dd. Thanks for pointing this

Re: [PATCH 10/35] commit: add repository argument to lookup_commit

2018-06-14 Thread Brandon Williams
On 06/14, Stefan Beller wrote: > On Thu, Jun 14, 2018 at 9:22 AM Duy Nguyen wrote: > > > > On Wed, May 30, 2018 at 2:51 AM Stefan Beller wrote: > > > diff --git a/shallow.c b/shallow.c > > > index 9bb07a56dca..60fe1fe1e58 100644 > > > --- a/shallow.c > > > +++ b/shallow.c > > > @@ -31,7 +31,7 @@

Re: [PATCH v2 8/8] fetch-pack: implement ref-in-want

2018-06-14 Thread Brandon Williams
On 06/14, Stefan Beller wrote: > On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > > +static void receive_wanted_refs(struct packet_reader *reader, struct ref > > *refs) > > +{ > ... > > + > > + for (r = refs; r; r = r->next) { > > + if

Re: [PATCH 10/35] commit: add repository argument to lookup_commit

2018-06-14 Thread Stefan Beller
On Thu, Jun 14, 2018 at 9:22 AM Duy Nguyen wrote: > > On Wed, May 30, 2018 at 2:51 AM Stefan Beller wrote: > > diff --git a/shallow.c b/shallow.c > > index 9bb07a56dca..60fe1fe1e58 100644 > > --- a/shallow.c > > +++ b/shallow.c > > @@ -31,7 +31,7 @@ int register_shallow(struct repository *r,

Re: OAuth2 support in git?

2018-06-14 Thread Jeff King
On Thu, Jun 14, 2018 at 04:46:10PM -0400, Randall S. Becker wrote: > > I suspect (2) would fit in with the existing code better, as the special > > case > > would mostly be limited to the manner in which we feed the credential to > > curl. And you could probably just set a config option for

Re: [PATCH v4 00/23] Fix incorrect use of the_index

2018-06-14 Thread Elijah Newren
On Thu, Jun 14, 2018 at 10:18 AM, Duy Nguyen wrote: > On Mon, Jun 11, 2018 at 06:49:00PM +0200, Duy Nguyen wrote: >> On Mon, Jun 11, 2018 at 6:44 PM Elijah Newren wrote: >> > > What about merge-recursive.c? Given that this whole thing will take >> > > many release cycles to finish, your work may

RE: OAuth2 support in git?

2018-06-14 Thread Randall S. Becker
On June 14, 2018 11:15 AM, Jeff King wrote: > On Thu, Jun 14, 2018 at 10:13:42AM +, brian m. carlson wrote: > > > > I know that other git server environments like github support that > > > on client side by allowing tokens to be used as usernames in a BASIC > > > authentication flow. We could

Re: [GSoC][PATCH v2 2/2] rebase--interactive: rewrite the edit-todo functionality in C

2018-06-14 Thread Elijah Newren
Hi Alban, On Thu, Jun 14, 2018 at 1:24 PM, Alban Gruin wrote: > Le 14/06/2018 à 22:14, Junio C Hamano a écrit : >> Alban Gruin writes: >> >>> diff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c >>> index ded5e291d..d2990b210 100644 >>> --- a/builtin/rebase--helper.c >>> +++

Re: [PATCH] t5526: test recursive submodules when fetching moved submodules

2018-06-14 Thread Heiko Voigt
On Thu, Jun 14, 2018 at 10:37:30AM -0700, Stefan Beller wrote: > The topic merged in 0c7ecb7c311 (Merge branch 'sb/submodule-move-nested', > 2018-05-08) provided support for moving nested submodules. > > Remove the NEEDSWORK comment and implement the nested submodules test as > the comment hinted

Re: [PATCH] submodule: fix NULL correctness in renamed broken submodules

2018-06-14 Thread Heiko Voigt
Hi, On Thu, Jun 14, 2018 at 10:31:07AM -0700, Stefan Beller wrote: > When fetching with recursing into submodules, the fetch logic inspects > the superproject which submodules actually need to be fetched. This is > tricky for submodules that were renamed in the fetched range of commits. > This

Re: [GSoC][PATCH v2 2/2] rebase--interactive: rewrite the edit-todo functionality in C

2018-06-14 Thread Alban Gruin
Hi Junio, Le 14/06/2018 à 22:14, Junio C Hamano a écrit : > Alban Gruin writes: > >> diff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c >> index ded5e291d..d2990b210 100644 >> --- a/builtin/rebase--helper.c >> +++ b/builtin/rebase--helper.c >> @@ -12,12 +12,12 @@ static const char

Re: [GSoC][PATCH v2 2/2] rebase--interactive: rewrite the edit-todo functionality in C

2018-06-14 Thread Junio C Hamano
Alban Gruin writes: > diff --git a/builtin/rebase--helper.c b/builtin/rebase--helper.c > index ded5e291d..d2990b210 100644 > --- a/builtin/rebase--helper.c > +++ b/builtin/rebase--helper.c > @@ -12,12 +12,12 @@ static const char * const builtin_rebase_helper_usage[] = > { > int

Re: [PATCH v2 8/8] fetch-pack: implement ref-in-want

2018-06-14 Thread Stefan Beller
On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > +static void receive_wanted_refs(struct packet_reader *reader, struct ref > *refs) > +{ ... > + > + for (r = refs; r; r = r->next) { > + if (!strcmp(end, r->name)) { > +

Re: [PATCH v2 4/8] fetch-pack: use ref adv. to prune "have" sent

2018-06-14 Thread Junio C Hamano
Jonathan Tan writes: > +test_expect_success 'use ref advertisement to prune "have" lines sent' ' > + rm -rf server client && > + git init server && > + test_commit -C server both_have_1 && > + git -C server tag -d both_have_1 && > + test_commit -C server both_have_2 && > + >

Re: [PATCH v2 7/8] fetch-pack: put shallow info in output parameter

2018-06-14 Thread Stefan Beller
> + !oidcmp(>peer_ref->old_oid, >old_oid)) { > + /* > +* These need to be reported as fetched, but we don > not do not or don't; there is no middle way. ;)

Re: [ANNOUNCE] Git v2.16.0-rc0

2018-06-14 Thread Jeff King
On Thu, Jun 14, 2018 at 11:55:22AM -0700, Jonathan Nieder wrote: > > No, my wrapper _isn't_ simple. It passes most options to openssh, but > > just doesn't understand the "-G" probing. So if the default was > > openssh-like instead of "simple", then that would work fine without me > > setting

Re: [PATCH v2 5/8] fetch-pack: make negotiation-related vars local

2018-06-14 Thread Junio C Hamano
Jonathan Tan writes: > -static struct prio_queue rev_list = { compare_commits_by_commit_date }; > -static int non_common_revs, multi_ack, use_sideband; > +struct data { > + struct prio_queue rev_list; > + int non_common_revs; > +}; > + > +static int multi_ack, use_sideband; Aside from

Re: [PATCH v2 05/31] tree: add repository argument to lookup_tree

2018-06-14 Thread Derrick Stolee
On 6/14/2018 1:55 PM, Derrick Stolee wrote: On 6/13/2018 7:04 PM, Stefan Beller wrote: diff --git a/commit-graph.c b/commit-graph.c index 71125d7cbb6..88a4b0d2a47 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -261,7 +261,7 @@ static int fill_commit_in_graph(struct commit *item, struct

Re: [PATCH v2 6/8] fetch: refactor to make function args narrower

2018-06-14 Thread Stefan Beller
On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > Refactor find_non_local_tags and get_ref_map to only take the > information they need instead of the entire transport struct. Besides > improving code clarity, this also improves their flexibility, allowing > for a different set of refs

Re: [PATCH v2 3/8] upload-pack: test negotiation with changing repository

2018-06-14 Thread Stefan Beller
On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > Add tests to check the behavior of fetching from a repository which > changes between rounds of negotiation (for example, when different > servers in a load-balancing agreement participate in the same stateless > RPC negotiation). This

Re: [PATCH v2 1/8] test-pkt-line: add unpack-sideband subcommand

2018-06-14 Thread Brandon Williams
On 06/14, Stefan Beller wrote: > On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > > > Add an 'unpack-sideband' subcommand to the test-pkt-line helper to > > enable unpacking packet line data sent multiplexed using a sideband. > > > > Signed-off-by: Brandon Williams > > --- > >

Re: [PATCH 19/20] abbrev: support relative abbrev values

2018-06-14 Thread Ævar Arnfjörð Bjarmason
On Thu, Jun 14 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> On Wed, Jun 13 2018, Junio C Hamano wrote: >> >>> Ævar Arnfjörð Bjarmason writes: >>> E.g. here's a breakdown of my dotfiles repo: $ git -c core.abbrev=4 log --pretty=format:%h|perl -nE

Re: [ANNOUNCE] Git v2.16.0-rc0

2018-06-14 Thread Jonathan Nieder
Hi, Sorry for the slow replies. I was out of office earlier and am back now. Jeff King wrote: > On Tue, Jun 12, 2018 at 09:29:13AM -0700, Junio C Hamano wrote: >> Jeff King writes: >>> To be honest, I could easily see an argument that I _should_ be setting >>> GIT_SSH_VARIANT to explain what

Re: [PATCH v2 2/8] upload-pack: implement ref-in-want

2018-06-14 Thread Brandon Williams
On 06/14, Stefan Beller wrote: > Hi Brandon, > On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > negotiation, which may happen if, for example, the desired repository is > > provided by multiple Git servers in a load-balancing arrangement. > > ... and the repository is not replicated

Re: [PATCH v2 2/8] upload-pack: implement ref-in-want

2018-06-14 Thread Stefan Beller
Hi Brandon, On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > Currently, while performing packfile negotiation, clients are only > allowed to specify their desired objects using object ids. This causes > a vulnerability to failure when an object turns non-existent during I stopped

Re: [ANNOUNCE] Git v2.16.0-rc0

2018-06-14 Thread Jeff King
On Tue, Jun 12, 2018 at 09:29:13AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > To be honest, I could easily see an argument that I _should_ be setting > > GIT_SSH_VARIANT to explain what my wrapper is expecting, even though it > > happened to work before. > > The way I read that

Re: [PATCH v2 00/31] object-store: lookup_commit

2018-06-14 Thread Brandon Williams
On 06/13, Stefan Beller wrote: > * removed mentions of cooci patches > * added forward declaration of commit buffer slabs. > * dropped 3 patches that add the repository to lookup_unkonwn_object, > parse_commit and parse_commit_gently, but were not converting those > functions. We'll convert

Re: [RFC PATCH 4/4] t/lib-httpd: sort log based on timestamp to avoid occasional failure

2018-06-14 Thread Junio C Hamano
Jeff King writes: >> Another alternative is to simply accept that these tests are racy, and >> that the resulting test failures are rare enough that it isn't worth >> the complexity of the workaround, but adding a comment to the affected >> tests warning about the raciness is

RE: fatal: could not reset submodule index

2018-06-14 Thread Antoine W. Campagna
On Wed, Jun 13, 2018 at 18:19, Antoine W. Campagna wrote: > Here is the full reproduction instructions: Newlines got mangled, making my message hard to read. Sorry. Here is the corrected reproduction instructions: # Create a repository mkdir main cd main git init touch main.txt git add main.txt

Re: [PATCH v2 1/8] test-pkt-line: add unpack-sideband subcommand

2018-06-14 Thread Stefan Beller
On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > Add an 'unpack-sideband' subcommand to the test-pkt-line helper to > enable unpacking packet line data sent multiplexed using a sideband. > > Signed-off-by: Brandon Williams > --- > t/helper/test-pkt-line.c | 37

Re: [PATCH] fetch-pack: test explicitly that --all can fetch tag references pointing to non-commits

2018-06-14 Thread Kirill Smelkov
On Thu, Jun 14, 2018 at 09:07:26AM -0700, Junio C Hamano wrote: > Kirill Smelkov writes: > > > Jeff, thanks for corrections. I originally tried to look into invoking > > "git tag" two times, but since git tag always creates a reference it > > would not be semantically the same as having one

Re: [RFC PATCH 0/4] Fix occasional test failures in http tests

2018-06-14 Thread Jeff King
On Thu, Jun 14, 2018 at 02:31:03PM +0200, SZEDER Gábor wrote: > 't5561-http-backend.sh' is prone to occasional failures; luckily it's > not 'git-http-backend's fault, but the test script is a bit racy. I > won't go into the details here, patch 4/4's commit message discusses > it at length. 4/4

Re: [PATCH v2 05/31] tree: add repository argument to lookup_tree

2018-06-14 Thread Derrick Stolee
On 6/13/2018 7:04 PM, Stefan Beller wrote: diff --git a/commit-graph.c b/commit-graph.c index 71125d7cbb6..88a4b0d2a47 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -261,7 +261,7 @@ static int fill_commit_in_graph(struct commit *item, struct commit_graph *g, uin item->graph_pos =

Re: [RFC PATCH 4/4] t/lib-httpd: sort log based on timestamp to avoid occasional failure

2018-06-14 Thread Jeff King
On Thu, Jun 14, 2018 at 02:31:07PM +0200, SZEDER Gábor wrote: > The last test of 't5561-http-backend.sh', 'server request log matches > test results' may fail occasionally, because the order of entries in > Apache's access log doesn't match the order of requests sent in the > previous tests,

Re: [PATCH] t3200: clarify description of --set-upstream test

2018-06-14 Thread Junio C Hamano
Kaartic Sivaraam writes: > Support for the --set-upstream option was removed in 52668846ea > (builtin/branch: stop supporting the "--set-upstream" option, > 2017-08-17). The change did not completely remove the command > due to an issue noted in the commit's log message. > > So, a test was added

Re: [PATCH v2 8/8] negotiator/default: use better style in comments

2018-06-14 Thread Brandon Williams
On 06/06, Jonathan Tan wrote: > Signed-off-by: Jonathan Tan > --- > negotiator/default.c | 14 ++ > 1 file changed, 6 insertions(+), 8 deletions(-) > > diff --git a/negotiator/default.c b/negotiator/default.c > index b8f45cf78..a9e52c943 100644 > --- a/negotiator/default.c > +++

Re: [PATCH v2 5/8] fetch-pack: make negotiation-related vars local

2018-06-14 Thread Brandon Williams
On 06/06, Jonathan Tan wrote: > Reduce the number of global variables by making the priority queue and > the count of non-common commits in it local, passing them as a struct to > various functions where necessary. > > This also helps in the case that fetch_pack() is invoked twice in the > same

Re: [PATCH 2/2] builtin/blame: highlight recently changed lines

2018-06-14 Thread Junio C Hamano
René Scharfe writes: > > This adds a minor memory leak; fix below. > > -- >8 -- > Subject: [PATCH] blame: release string_list after use in parse_color_fields() > > Signed-off-by: Rene Scharfe > --- Thanks. Will apply. > builtin/blame.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

[PATCH] t5526: test recursive submodules when fetching moved submodules

2018-06-14 Thread Stefan Beller
The topic merged in 0c7ecb7c311 (Merge branch 'sb/submodule-move-nested', 2018-05-08) provided support for moving nested submodules. Remove the NEEDSWORK comment and implement the nested submodules test as the comment hinted at. Signed-off-by: Stefan Beller --- I found this when digging around

Re: [PATCH 24/30] merge-recursive: Add computation of collisions due to dir rename & merging

2018-06-14 Thread Junio C Hamano
René Scharfe writes: > The value of PATH_MAX is platform-dependent, so it's easy to exceed when > doing cross-platform development. It's also not a hard limit on most > operating systems, not even on Windows. Further reading: > >

Re: [PATCH v2 3/8] fetch-pack: directly end negotiation if ACK ready

2018-06-14 Thread Brandon Williams
On 06/14, Brandon Williams wrote: > On 06/06, Jonathan Tan wrote: > > When "ACK %s ready" is received, find_common() clears rev_list in an > > attempt to stop further "have" lines from being sent [1]. It is much > > more readable to explicitly break from the loop instead, so do this. > > > > This

Re: [PATCH v2 4/8] fetch-pack: use ref adv. to prune "have" sent

2018-06-14 Thread Brandon Williams
On 06/06, Jonathan Tan wrote: > In negotiation using protocol v2, fetch-pack sometimes does not make > full use of the information obtained in the ref advertisement: > specifically, that if the server advertises a commit that the client > also has, the client never needs to inform the server that

[PATCH] submodule: fix NULL correctness in renamed broken submodules

2018-06-14 Thread Stefan Beller
When fetching with recursing into submodules, the fetch logic inspects the superproject which submodules actually need to be fetched. This is tricky for submodules that were renamed in the fetched range of commits. This was implemented in c68f8375760 (implement fetching of moved submodules,

Re: [PATCH v2 3/8] fetch-pack: directly end negotiation if ACK ready

2018-06-14 Thread Brandon Williams
On 06/06, Jonathan Tan wrote: > When "ACK %s ready" is received, find_common() clears rev_list in an > attempt to stop further "have" lines from being sent [1]. It is much > more readable to explicitly break from the loop instead, so do this. > > This means that the memory in priority queue will

Re: [PATCH v2 1/8] fetch-pack: split up everything_local()

2018-06-14 Thread Brandon Williams
On 06/06, Jonathan Tan wrote: > The function everything_local(), despite its name, also (1) marks > commits as COMPLETE and COMMON_REF and (2) invokes filter_refs() as > important side effects. Extract (1) into its own function > (mark_complete_and_common_ref()) and remove > (2). > > The

Re: [PATCH v4 00/23] Fix incorrect use of the_index

2018-06-14 Thread Duy Nguyen
On Mon, Jun 11, 2018 at 06:49:00PM +0200, Duy Nguyen wrote: > On Mon, Jun 11, 2018 at 6:44 PM Elijah Newren wrote: > > > What about merge-recursive.c? Given that this whole thing will take > > > many release cycles to finish, your work may get merged before mine > > > and I could do the

Re: [RFC PATCH 0/4] Fix occasional test failures in http tests

2018-06-14 Thread Junio C Hamano
SZEDER Gábor writes: > 't5561-http-backend.sh' is prone to occasional failures; luckily it's > not 'git-http-backend's fault, but the test script is a bit racy. I > won't go into the details here, patch 4/4's commit message discusses > it at length. 4/4 also fixes this issue, but I'm not

Re: [RFC PATCH 4/4] t/lib-httpd: sort log based on timestamp to avoid occasional failure

2018-06-14 Thread SZEDER Gábor
On Thu, Jun 14, 2018 at 2:31 PM, SZEDER Gábor wrote: > When a test sends a HTTP request, it can continue execution after > 'git-http-backend' fulfilled that request, but Apache writes the > corresponding access log entry only after 'git-http-backend' exited. > Some time inevitably passes between

Re: [PATCH v2 00/31] object-store: lookup_commit

2018-06-14 Thread Duy Nguyen
On Thu, Jun 14, 2018 at 1:08 AM Stefan Beller wrote: > > * removed mentions of cooci patches > * added forward declaration of commit buffer slabs. > * dropped 3 patches that add the repository to lookup_unkonwn_object, > parse_commit and parse_commit_gently, but were not converting those >

Re: [PATCH 10/35] commit: add repository argument to lookup_commit

2018-06-14 Thread Duy Nguyen
On Wed, May 30, 2018 at 2:51 AM Stefan Beller wrote: > diff --git a/shallow.c b/shallow.c > index 9bb07a56dca..60fe1fe1e58 100644 > --- a/shallow.c > +++ b/shallow.c > @@ -31,7 +31,7 @@ int register_shallow(struct repository *r, const struct > object_id *oid) > { > struct commit_graft

Re: [PATCH] fetch-pack: test explicitly that --all can fetch tag references pointing to non-commits

2018-06-14 Thread Junio C Hamano
Kirill Smelkov writes: > Jeff, thanks for corrections. I originally tried to look into invoking > "git tag" two times, but since git tag always creates a reference it > would not be semantically the same as having one referenced tag object > pointing to another tag object which does not have

Re: [PATCH 19/20] abbrev: support relative abbrev values

2018-06-14 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On Wed, Jun 13 2018, Junio C Hamano wrote: > >> Ævar Arnfjörð Bjarmason writes: >> >>> E.g. here's a breakdown of my dotfiles repo: >>> >>> $ git -c core.abbrev=4 log --pretty=format:%h|perl -nE 'chomp;say >>> length'|sort|uniq -c|sort -nr >>> 784

Re: BUG: submodule code prints '(null)'

2018-06-14 Thread Duy Nguyen
On Thu, Jun 14, 2018 at 5:15 PM Heiko Voigt wrote: > ... > Would you want to update your patch? Or should I put one on top? I think it's better that you make a proper patch. You can provide explanation and all. I am more like a bug reporter :) -- Duy

Re: BUG: submodule code prints '(null)'

2018-06-14 Thread Heiko Voigt
On Mon, Jun 11, 2018 at 03:56:16PM -0700, Stefan Beller wrote: > On Sat, Jun 9, 2018 at 4:04 AM Duy Nguyen wrote: > > > > On Tue, Jun 05, 2018 at 05:31:41PM +0200, Duy Nguyen wrote: > > > I do not know how to reproduce this (and didn't bother to look deeply > > > into it after I found it was not

Re: OAuth2 support in git?

2018-06-14 Thread Jeff King
On Thu, Jun 14, 2018 at 10:13:42AM +, brian m. carlson wrote: > > I know that other git server environments like github support that on > > client side by allowing tokens to be used as usernames in a BASIC > > authentication flow. We could do the same but I am asking whether > > there is also

[Appointment Request] at LIFESTYLE EXPO TOKYO 2018 [July]

2018-06-14 Thread Eiichi Hasegawa LIFESTYLE EXPO TOKYO Show Management
Dear International Sales & Marketing Director, Zhejiang Wuchuan Industrial Co., Ltd Hello, this is Eiichi Hasegawa from LIFESTYLE EXPO TOKYO 2018 Show Management. This is to ask you for an appointment at LIFESTYLE EXPO TOKYO 2018 [July] (July 4-6, 2018). If you are planning on expanding your

[PATCH] t3200: clarify description of --set-upstream test

2018-06-14 Thread Kaartic Sivaraam
Support for the --set-upstream option was removed in 52668846ea (builtin/branch: stop supporting the "--set-upstream" option, 2017-08-17). The change did not completely remove the command due to an issue noted in the commit's log message. So, a test was added to ensure that a command which uses

(Bug report + fix) gitk "IgnCase" search doesn't ignore case

2018-06-14 Thread Juan Navarro
Hi, this question was originally posted on the Google Groups list, trying to get help (https://groups.google.com/d/topic/git-users/QAFKOQU4eUo/discussion). Now that it's confirmed as a bug and I have a proposed solution, I'm posting here. Gitk "find commit" search function doesn't follow

[PATCH 3/4] t/lib-httpd: add minor and patch version to $HTTPD_VERSION

2018-06-14 Thread SZEDER Gábor
To fix an occasional test failure, the next patch will rely on an Apache log format specifier that was introduced in version 2.2.30. Consequently, 't/lib-httpd.sh' must be able to decide whether the Apache version used for testing is equal or newer than that version to be able to act accordingly

[RFC PATCH 4/4] t/lib-httpd: sort log based on timestamp to avoid occasional failure

2018-06-14 Thread SZEDER Gábor
The last test of 't5561-http-backend.sh', 'server request log matches test results' may fail occasionally, because the order of entries in Apache's access log doesn't match the order of requests sent in the previous tests, although all the right requests are there. I saw it fail on Travis CI five

[PATCH 2/4] t/lib-httpd: add the strip_access_log() helper function

2018-06-14 Thread SZEDER Gábor
Four tests in three httpd-related test scripts check the contents of Apache's 'access.log', and they all do so by running 'sed' with the exact same script consisting of four s/// commands to strip uninteresting log fields and to vertically align the requested URLs. Extract this into a common

[PATCH 1/4] t5541: avoid empty line when truncating access log

2018-06-14 Thread SZEDER Gábor
The second test of 't5541-http-push-smart.sh', 'no empty path components' truncates Apache's access log by running echo >.../access.log which doesn't leave an empty file behind, like a proper truncation would, but a file with a lone newline in it. Consequently, a later test checking the log's

[RFC PATCH 0/4] Fix occasional test failures in http tests

2018-06-14 Thread SZEDER Gábor
't5561-http-backend.sh' is prone to occasional failures; luckily it's not 'git-http-backend's fault, but the test script is a bit racy. I won't go into the details here, patch 4/4's commit message discusses it at length. 4/4 also fixes this issue, but I'm not particularly happy with that fix,

Re: OAuth2 support in git?

2018-06-14 Thread brian m. carlson
On Thu, Jun 14, 2018 at 10:09:39AM +0200, Christian Halstrick wrote: > Can I use native git as client to contact a git server which does > authentication with OAuth2 Client Credentials Grant [1]? > > Background: We are running gerrit based git servers [2] in a cloud > environment. That

Re: [GSoC][PATCH v2 0/2] rebase -i: rewrite the edit-todo functionality in C

2018-06-14 Thread Phillip Wood
Hi Alban On 13/06/18 16:22, Alban Gruin wrote: > This patch rewrites the edit-todo functionality from shell to C. This is > part of the effort to rewrite interactive rebase in C. > > Changes since v1: > > - Add a new function to launch the sequence editor, as advised by >Phillip Wood[0]

OAuth2 support in git?

2018-06-14 Thread Christian Halstrick
Can I use native git as client to contact a git server which does authentication with OAuth2 Client Credentials Grant [1]? Background: We are running gerrit based git servers [2] in a cloud environment. That environment supports OAuth2 authorization for the apps running in the cloud. The idea is

Re: [PATCH 19/20] abbrev: support relative abbrev values

2018-06-14 Thread Ævar Arnfjörð Bjarmason
On Wed, Jun 13 2018, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> E.g. here's a breakdown of my dotfiles repo: >> >> $ git -c core.abbrev=4 log --pretty=format:%h|perl -nE 'chomp;say >> length'|sort|uniq -c|sort -nr >> 784 4 >> 59 5 >> 7 6 >> >>