Re: [PATCH ps/stash-in-c] strbuf_vinsertf: provide the correct buffer size to vsnprintf

2019-02-03 Thread Johannes Sixt
Am 03.02.19 um 17:51 schrieb Johannes Sixt: > strbuf_vinsertf inserts a formatted string in the middle of an existing > strbuf value. Quite frankly, this is a really unusual operation, and I'd prefer to get rid of it. There is only one call, and it looks like it only wants to be lazy and save one

[PATCH] fetch-pack: clear alternate shallow when complete

2019-02-03 Thread brian m. carlson
When we write an alternate shallow file in update_shallow, we write it into the lock file. The string stored in alternate_shallow_file is copied from the lock file path, but it is freed the moment that the lock file is closed, since we call strbuf_release to free that path. This used to work, sinc

Re: [PATCH v2] doc-diff: don't `cd_to_toplevel` before calling `usage`

2019-02-03 Thread Jeff King
On Sun, Feb 03, 2019 at 12:08:17PM +0100, Martin Ågren wrote: > `usage` tries to call $0, which might very well be "./doc-diff", so if > we `cd_to_toplevel` before calling `usage`, we'll end with an error to > the effect of "./doc-diff: not found" rather than a friendly `doc-diff > -h` output. Gra

Re: [PATCH v3] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-02-03 Thread Eric Sunshine
On Sun, Feb 3, 2019 at 4:01 PM Sven van Haastregt wrote: > Until now, `git submodule summary` was always emitting 7-character > SHA-1s that have a higher chance of being ambiguous for larger > repositories. Use `git rev-parse --short` instead, which will > determine suitable short SHA-1 lengths.

[PATCH v3] git-submodule.sh: shorten submodule SHA-1s using rev-parse

2019-02-03 Thread Sven van Haastregt
Until now, `git submodule summary` was always emitting 7-character SHA-1s that have a higher chance of being ambiguous for larger repositories. Use `git rev-parse --short` instead, which will determine suitable short SHA-1 lengths. We cannot always rely on successfully invoking `git rev-parse` in

[PATCH ps/stash-in-c] strbuf_vinsertf: provide the correct buffer size to vsnprintf

2019-02-03 Thread Johannes Sixt
strbuf_vinsertf inserts a formatted string in the middle of an existing strbuf value. It makes room in the strbuf by moving existing string to the back, then formats the string to insert directly into the hole. It uses vsnprintf to format the string. The buffer size provided in the invocation is t

Re: [PATCH 0/1] Using sparse in a CI job

2019-02-03 Thread Ramsay Jones
On 03/02/2019 12:12, SZEDER Gábor wrote: > On Sun, Feb 03, 2019 at 01:49:37AM +, Ramsay Jones wrote: >> On 02/02/2019 00:41, SZEDER Gábor wrote: >>> On Fri, Feb 01, 2019 at 09:01:20PM +, Ramsay Jones wrote: At the moment, on Linux, the sp-out file is free from any sparse errors

Re: [PATCH 0/1] Using sparse in a CI job

2019-02-03 Thread Ramsay Jones
On 01/02/2019 22:40, Luc Van Oostenryck wrote: > On Fri, Feb 01, 2019 at 09:01:20PM +, Ramsay Jones wrote: >> >> I suspect that the Makefile sparse target is not easy to use in a CI >> job, since the 'sparse' program (via cgcc -no-compile) does not exit >> with a non-zero value, even when is

Re: [PATCH 0/1] Using sparse in a CI job

2019-02-03 Thread SZEDER Gábor
On Sun, Feb 03, 2019 at 01:49:37AM +, Ramsay Jones wrote: > On 02/02/2019 00:41, SZEDER Gábor wrote: > > On Fri, Feb 01, 2019 at 09:01:20PM +, Ramsay Jones wrote: > >> At the moment, on Linux, the sp-out file is free from any sparse errors > >> or warnings. So are next and pu: > >> > >> $

[PATCH v2] doc-diff: don't `cd_to_toplevel` before calling `usage`

2019-02-03 Thread Martin Ågren
`usage` tries to call $0, which might very well be "./doc-diff", so if we `cd_to_toplevel` before calling `usage`, we'll end with an error to the effect of "./doc-diff: not found" rather than a friendly `doc-diff -h` output. Granted, all of these `usage` calls are in error paths, so we're about to

Re: [PATCH] doc-diff: don't `cd_to_toplevel` before calling `usage`

2019-02-03 Thread Eric Sunshine
On Sun, Feb 3, 2019 at 5:37 AM Martin Ågren wrote: > On Sun, 3 Feb 2019 at 10:12, Eric Sunshine wrote: > > On Sun, Feb 3, 2019 at 4:08 AM Eric Sunshine > > wrote: > > > I wonder if a more fruitful, longer-term fix which would save us from > > > having to worry about this in the future, would be

Re: [PATCH] doc-diff: don't `cd_to_toplevel` before calling `usage`

2019-02-03 Thread Martin Ågren
On Sun, 3 Feb 2019 at 10:12, Eric Sunshine wrote: > > On Sun, Feb 3, 2019 at 4:08 AM Eric Sunshine wrote: > > I wonder if a more fruitful, longer-term fix which would save us from > > having to worry about this in the future, would be to make > > git-sh-setup.sh remember the original $0 before cd

Re: [PATCH] doc-diff: don't `cd_to_toplevel` before calling `usage`

2019-02-03 Thread Eric Sunshine
On Sun, Feb 3, 2019 at 4:08 AM Eric Sunshine wrote: > I wonder if a more fruitful, longer-term fix which would save us from > having to worry about this in the future, would be to make > git-sh-setup.sh remember the original $0 before cd_to_toplevel() and > then employ the original value when usag

Re: [PATCH] doc-diff: don't `cd_to_toplevel` before calling `usage`

2019-02-03 Thread Eric Sunshine
On Sun, Feb 3, 2019 at 3:37 AM Martin Ågren wrote: > `usage` tries to call $0, which might very well be "./doc-diff", so if > we `cd_to_toplevel` before calling `usage`, we'll end with an error to > the effect of "./doc-diff: not found" rather than a friendly `doc-diff > -h` output. Granted, all o

[PATCH] doc-diff: don't `cd_to_toplevel` before calling `usage`

2019-02-03 Thread Martin Ågren
`usage` tries to call $0, which might very well be "./doc-diff", so if we `cd_to_toplevel` before calling `usage`, we'll end with an error to the effect of "./doc-diff: not found" rather than a friendly `doc-diff -h` output. Granted, all of these `usage` calls are in error paths, so we're about to

Re: Periodic hang during git index-pack

2019-02-03 Thread Sitsofe Wheeler
On Wed, 19 Dec 2018 at 22:59, Sitsofe Wheeler wrote: > > While using trying to use git to clone a remote repository git > index-pack occasionally goes on to hang: On Thu, 20 Dec 2018 at 16:48, Sitsofe Wheeler wrote: > > On Thu, 20 Dec 2018 at 15:11, Jeff King wrote: > > [snip] > > > > with each