Re: [Problem] test_must_fail makes possibly questionable assumptions about exit_code.

2018-02-27 Thread Jeff King
On Wed, Feb 28, 2018 at 07:42:51AM +, Eric Wong wrote: > > > > a) We could override the meaning of die() in Git.pm. This feels > > > > ugly but if it works, it would be a very small patch. > > > > > > Unlikely to work since I think we use eval {} to trap exceptions > > > from die. > >

Darlehen

2018-02-27 Thread Scotwest Credit Union Limited
Gre an Dich, GELD VERFGBAR ZU VERLEIHEN. Holen Sie sich das Geld / Darlehen, das Sie bei Scotwest Credit Union Limited bentigen. Wir sind private Kreditgeber / Investoren und bieten sowohl Privatdarlehen, Startdarlehen, Bildungs- / Agrarkredit, Immobilien- / Baudarlehen, Immobilienkredit,

Re: [Problem] test_must_fail makes possibly questionable assumptions about exit_code.

2018-02-27 Thread Eric Wong
Jeff King wrote: > On Wed, Feb 28, 2018 at 04:07:18AM +, Eric Wong wrote: > > > > In the rest of git, die() makes a command exit with status 128. The > > > trouble here is that our code in Perl is assuming the same meaning for > > > die() but using perl's die builtin instead.

Re: [PATCH] revision.c: reduce object database queries

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 03:16:58PM -0800, Junio C Hamano wrote: > >> This code comes originally form 454fbbcde3 (git-rev-list: allow missing > >> objects when the parent is marked UNINTERESTING, 2005-07-10). But later, > >> in aeeae1b771 (revision traversal: allow UNINTERESTING objects to be > >>

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Sergey Organov
Igor Djordjevic writes: > On 28/02/2018 03:12, Igor Djordjevic wrote: >> >> Would additional step as suggested in [1] (using R1 and R2 to "catch" >> interactive rebase additions/amendments/drops, on top of U1' and >> U2'), make more sense (or provide an additional

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Sergey Organov
Jacob Keller writes: > On Tue, Feb 27, 2018 at 10:14 AM, Junio C Hamano wrote: >> Sergey Organov writes: >> >>> You've already bit this poor thingy to death. Please rather try your >>> teeth on the proposed Trivial Merge (TM)

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Sergey Organov
Hi Johannes, Johannes Schindelin writes: > Hi Buga, > > thank you for making this a lot more understandable to this thick > developer. > > On Tue, 27 Feb 2018, Igor Djordjevic wrote: > >> On 27/02/2018 19:55, Igor Djordjevic wrote: >> > >> > It would be more along

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Sergey Organov
Junio C Hamano writes: > Igor Djordjevic writes: > >> On 27/02/2018 20:59, Igor Djordjevic wrote: >>> >>> (3) ---X1---o---o---o---o---o---X2 >>>|\ |\ >>>| A1---A2---A3---U1 | A1'--A2'--A3'--U1' >>>

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Sergey Organov
Igor Djordjevic writes: > On 28/02/2018 01:36, Jacob Keller wrote: >> >> > > (3) ---X1---o---o---o---o---o---X2 >> > >|\ |\ >> > >| A1---A2---A3---U1 | A1'--A2'--A3'--U1' >> > >| \ | >> > >

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Sergey Organov
Igor Djordjevic writes: > On 27/02/2018 20:59, Igor Djordjevic wrote: >> >> (3) ---X1---o---o---o---o---o---X2 >>|\ |\ >>| A1---A2---A3---U1 | A1'--A2'--A3'--U1' >>| \ | >>|

Re: [Problem] test_must_fail makes possibly questionable assumptions about exit_code.

2018-02-27 Thread Jeff King
On Wed, Feb 28, 2018 at 04:07:18AM +, Eric Wong wrote: > > In the rest of git, die() makes a command exit with status 128. The > > trouble here is that our code in Perl is assuming the same meaning for > > die() but using perl's die builtin instead. That suggests a few > > options: > > > >

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Sergey Organov
Junio C Hamano writes: > Sergey Organov writes: > >> You've already bit this poor thingy to death. Please rather try your >> teeth on the proposed Trivial Merge (TM) method. > > Whatever you do, do *NOT* call any part of your proposal "trivial > merge",

[PATCH] hooks/pre-auto-gc-battery: allow gc to run on non-laptops

2018-02-27 Thread Adam Borowski
Desktops and servers tend to have no power sensor, thus on_ac_power returns 255 ("unknown"). If that tool returns "unknown", there's no point in querying other sources as it already queried them, and is smarter than us (can handle multiple adapters). Reported by: Xin Li

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Igor Djordjevic
On 28/02/2018 03:12, Igor Djordjevic wrote: > > Would additional step as suggested in [1] (using R1 and R2 to "catch" > interactive rebase additions/amendments/drops, on top of U1' and > U2'), make more sense (or provide an additional clue, at least)? > > [1] >

F.LLI PISTOLESI Snc Company

2018-02-27 Thread .F.LLI PISTOLESI
Hello , I am looking for a reliable supplier /manufacturer of products for sell in Europe. I came across your listing and wanted to get some information regarding minimum Order Quantities, FOB pricing and also the possibility of packaging including payments terms. So could you please get

Re: [Problem] test_must_fail makes possibly questionable assumptions about exit_code.

2018-02-27 Thread Eric Wong
Jonathan Nieder wrote: > The fundamental thing is the actual Git commands, not the tests in the > testsuite, no? Right. I've never been picky about exit codes; only that a non-zero happens on errors. > In the rest of git, die() makes a command exit with status 128. The >

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Igor Djordjevic
Hi Junio, On 28/02/2018 01:10, Junio C Hamano wrote: > > > > (3) ---X1---o---o---o---o---o---X2 > > >|\ |\ > > >| A1---A2---A3---U1 | A1'--A2'--A3'--U1' > > >| \ | > > >| M | > > >|

Re: [PATCH] t: send verbose test-helper output to fd 4

2018-02-27 Thread SZEDER Gábor
On Thu, Feb 22, 2018 at 7:48 AM, Jeff King wrote: > This is a repost of the two patches from: > > https://public-inbox.org/git/20180209185710.ga23...@sigill.intra.peff.net/ > > (now just one patch, since sg/test-i18ngrep graduated and we can do it > all in one step). The idea got

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

2018-02-27 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 05:05:57PM -0800, Stefan Beller wrote: > This applies on top of origin/sb/object-store and is the continuation of > that series, adding the repository as a context argument to functions. > > This series focusses on packfile handling, exposing (re)prepare_packed_git > and

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Igor Djordjevic
Hi Johannes, On 28/02/2018 00:27, Johannes Schindelin wrote: > > thank you for making this a lot more understandable to this thick > developer. Hehe, no problem, it primarily served fighting my own thickness ;) > > Finally, we drop temporary commits, and record rebased commits A3' > > and B3'

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Igor Djordjevic
On 28/02/2018 02:33, Igor Djordjevic wrote: > > This seems to be working inside my (too trivial?) test case, for > interactive adding, dropping, and amending of rebased commits, > resulting "rebased" merge containing all the added/modified/dropped > changes, plus the original merge amendment,

[PATCH v3 3/4] sha1_file.c: move delayed getenv(altdb) back to setup_git_env()

2018-02-27 Thread Nguyễn Thái Ngọc Duy
getenv() is supposed to work on the main repository only. This delayed getenv() code in sha1_file.c makes it more difficult to convert sha1_file.c to a generic object store that could be used by both submodule and main repositories. Move the getenv() back in setup_git_env() where other env vars

[PATCH v3 4/4] repository: delete ignore_env member

2018-02-27 Thread Nguyễn Thái Ngọc Duy
This variable was added because the repo_set_gitdir() was created to cover both submodule and main repos, but these two are initialized a bit differently so ignore_env == 0 means main repo, while ignore_env != 0 is submodules. Since the difference part (env variables) has been moved out of

[PATCH v3 0/4] Delete ignore_env member in struct repository

2018-02-27 Thread Nguyễn Thái Ngọc Duy
v3 fixes comment style. Also since Brandon raised a question about shared_root, it's obviously not a good name, so I renamed it to commondir. I still keep the delete patch 2/4, but I move the repo_setup_env() deletion back to 1/4 so all env logic is in one patch (the introduction of new helper

[PATCH v3 1/4] repository.c: move env-related setup code back to environment.c

2018-02-27 Thread Nguyễn Thái Ngọc Duy
It does not make sense that generic repository code contains handling of environment variables, which are specific for the main repository only. Refactor repo_set_gitdir() function to take $GIT_DIR and optionally _all_ other customizable paths. These optional paths can be NULL and will be

[PATCH v3 2/4] repository.c: delete dead functions

2018-02-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- repository.c | 25 - 1 file changed, 25 deletions(-) diff --git a/repository.c b/repository.c index ae117efbf0..89e76173a3 100644 --- a/repository.c +++ b/repository.c @@ -16,31 +16,6 @@ static struct repository

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Igor Djordjevic
On 28/02/2018 01:36, Jacob Keller wrote: > > > > (3) ---X1---o---o---o---o---o---X2 > > >|\ |\ > > >| A1---A2---A3---U1 | A1'--A2'--A3'--U1' > > >| \ | > > >| M | > > >| /

Re: [PATCH] protocol: treat unrecognized protocol.version setting as 0

2018-02-27 Thread Jonathan Nieder
Duy Nguyen wrote: > On Wed, Feb 28, 2018 at 8:02 AM, Brandon Williams wrote: >> On 02/27, Jonathan Nieder wrote: >>> If I share my .gitconfig or .git/config file between multiple machines >>> (or between multiple Git versions on a single machine) and set >>> >>>

Re: [PATCH] protocol: treat unrecognized protocol.version setting as 0

2018-02-27 Thread Brandon Williams
On 02/28, Duy Nguyen wrote: > On Wed, Feb 28, 2018 at 8:02 AM, Brandon Williams wrote: > > On 02/27, Jonathan Nieder wrote: > >> If I share my .gitconfig or .git/config file between multiple machines > >> (or between multiple Git versions on a single machine) and set > >> > >>

Re: [PATCH] protocol: treat unrecognized protocol.version setting as 0

2018-02-27 Thread Duy Nguyen
On Wed, Feb 28, 2018 at 8:02 AM, Brandon Williams wrote: > On 02/27, Jonathan Nieder wrote: >> If I share my .gitconfig or .git/config file between multiple machines >> (or between multiple Git versions on a single machine) and set >> >> [protocol] >>

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

2018-02-27 Thread Brandon Williams
On 02/27, Jonathan Nieder wrote: > Brandon Williams wrote: > > > 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. > > Makes sense. > > [...] > > --- a/pkt-line.h > > +++

[PATCH 11/11] packfile: allow find_pack_entry to handle arbitrary repositories

2018-02-27 Thread Stefan Beller
Signed-off-by: Stefan Beller --- packfile.c | 10 +- packfile.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/packfile.c b/packfile.c index e16f8252233..399c59e640f 100644 --- a/packfile.c +++ b/packfile.c @@ -1835,18 +1835,18 @@ static int

[PATCH 09/11] packfile: allow reprepare_packed_git to handle arbitrary repositories

2018-02-27 Thread Stefan Beller
Signed-off-by: Stefan Beller --- packfile.c | 8 packfile.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packfile.c b/packfile.c index 9a3efc01555..b12fc0789e0 100644 --- a/packfile.c +++ b/packfile.c @@ -898,11 +898,11 @@ void

[PATCH 10/11] packfile: add repository argument to find_pack_entry

2018-02-27 Thread Stefan Beller
While at it move the documentation to the header and mention which pack files are searched. Signed-off-by: Stefan Beller --- packfile.c | 8 ++-- packfile.h | 7 ++- sha1_file.c | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packfile.c

[PATCH 04/11] packfile: add repository argument to prepare_packed_git_one

2018-02-27 Thread Stefan Beller
Signed-off-by: Stefan Beller --- packfile.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packfile.c b/packfile.c index 1c24b02cc84..8bb158fc84e 100644 --- a/packfile.c +++ b/packfile.c @@ -735,7 +735,8 @@ static void report_pack_garbage(struct

[PATCH 06/11] packfile: add repository argument to reprepare_packed_git

2018-02-27 Thread Stefan Beller
See previous patch for explanation. Signed-off-by: Stefan Beller --- builtin/gc.c | 2 +- builtin/receive-pack.c | 3 ++- bulk-checkin.c | 3 ++- fetch-pack.c | 3 ++- packfile.c | 2 +- packfile.h | 3 ++- sha1_file.c

[PATCH 01/11] packfile: allow prepare_packed_git_mru to handle arbitrary repositories

2018-02-27 Thread Stefan Beller
This conversion was done without the #define trick used in the earlier series refactoring to have better repository access, because this function is easy to review, as all lines are converted and it has only one caller Signed-off-by: Stefan Beller --- packfile.c | 10

[PATCH 03/11] packfile: allow install_packed_git to handle arbitrary repositories

2018-02-27 Thread Stefan Beller
This conversion was done without the #define trick used in the earlier series refactoring to have better repository access, because this function is easy to review, as it only has one caller and all lines but the first two are converted. We must not convert 'pack_open_fds' to be a repository

[PATCH 05/11] packfile: add repository argument to prepare_packed_git

2018-02-27 Thread Stefan Beller
Add a repository argument to allow prepare_packed_git callers to be more specific about which repository to handle. See c28d027a52c (sha1_file: add repository argument to link_alt_odb_entry, 2018-02-20) for an explanation of the #define trick. Signed-off-by: Stefan Beller ---

[PATCH 08/11] packfile: allow prepare_packed_git to handle arbitrary repositories

2018-02-27 Thread Stefan Beller
Signed-off-by: Stefan Beller --- packfile.c | 18 +- packfile.h | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packfile.c b/packfile.c index c45516acd41..9a3efc01555 100644 --- a/packfile.c +++ b/packfile.c @@ -883,19 +883,19 @@

[PATCH 00/11] Moving global state into the repository object (part 2)

2018-02-27 Thread Stefan Beller
This applies on top of origin/sb/object-store and is the continuation of that series, adding the repository as a context argument to functions. This series focusses on packfile handling, exposing (re)prepare_packed_git and find_pack_entry to a repository argument. Looking at the diffstat of

[PATCH 07/11] packfile: allow prepare_packed_git_one to handle arbitrary repositories

2018-02-27 Thread Stefan Beller
Signed-off-by: Stefan Beller --- packfile.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packfile.c b/packfile.c index 6ea50230aab..c45516acd41 100644 --- a/packfile.c +++ b/packfile.c @@ -735,8 +735,7 @@ static void report_pack_garbage(struct

[PATCH 02/11] packfile: allow rearrange_packed_git to handle arbitrary repositories

2018-02-27 Thread Stefan Beller
Signed-off-by: Stefan Beller --- packfile.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packfile.c b/packfile.c index b844b653265..5ccce419354 100644 --- a/packfile.c +++ b/packfile.c @@ -866,10 +866,10 @@ static int sort_pack(const void *a_,

Re: [PATCH] protocol: treat unrecognized protocol.version setting as 0

2018-02-27 Thread Brandon Williams
On 02/27, Jonathan Nieder wrote: > If I share my .gitconfig or .git/config file between multiple machines > (or between multiple Git versions on a single machine) and set > > [protocol] > version = 2 > > then running "git fetch" with a Git version that does not support >

Re: [PATCH v2 3/4] sha1_file.c: move delayed getenv(altdb) back to setup_git_env()

2018-02-27 Thread Duy Nguyen
On Wed, Feb 28, 2018 at 3:12 AM, Brandon Williams wrote: > On 02/27, Nguyễn Thái Ngọc Duy wrote: >> diff --git a/repository.c b/repository.c >> index 7654b8ada9..e326f0fcbc 100644 >> --- a/repository.c >> +++ b/repository.c >> @@ -61,6 +61,8 @@ void repo_set_gitdir(struct

[PATCH] protocol: treat unrecognized protocol.version setting as 0

2018-02-27 Thread Jonathan Nieder
If I share my .gitconfig or .git/config file between multiple machines (or between multiple Git versions on a single machine) and set [protocol] version = 2 then running "git fetch" with a Git version that does not support protocol v2 errors out with fatal:

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread SZEDER Gábor
On Tue, Feb 27, 2018 at 10:17 PM, Junio C Hamano wrote: > SZEDER Gábor writes: > >> + git read-tree -i -m $c3 2>actual-err && >> + test_must_be_empty expected-err && >> + git update-index --ignore-missing --refresh

Re: [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep

2018-02-27 Thread SZEDER Gábor
On Wed, Feb 28, 2018 at 12:47 AM, Ramsay Jones wrote: > > > On 27/02/18 22:05, Junio C Hamano wrote: >> Junio C Hamano writes: >> >>> OK, somehow I had the version from Ramsay on a topic branch that was >>> not merged to 'pu'. Here is the

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Jacob Keller
On Tue, Feb 27, 2018 at 3:40 PM, Igor Djordjevic wrote: > On 27/02/2018 20:59, Igor Djordjevic wrote: >> >> (3) ---X1---o---o---o---o---o---X2 >>|\ |\ >>| A1---A2---A3---U1 | A1'--A2'--A3'--U1' >>| \

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Jacob Keller
On Tue, Feb 27, 2018 at 10:14 AM, Junio C Hamano wrote: > Sergey Organov writes: > >> You've already bit this poor thingy to death. Please rather try your >> teeth on the proposed Trivial Merge (TM) method. > > Whatever you do, do *NOT* call any part of

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Jacob Keller
On Tue, Feb 27, 2018 at 8:21 AM, Johannes Schindelin wrote: > Hi Jake, > > On Mon, 26 Feb 2018, Jacob Keller wrote: > >> On Mon, Feb 26, 2018 at 4:07 PM, Johannes Schindelin >> wrote: >> > >> > On Tue, 20 Feb 2018, Igor Djordjevic wrote: >>

Re: [Problem] test_must_fail makes possibly questionable assumptions about exit_code.

2018-02-27 Thread Jonathan Nieder
Hi, Randall S. Becker wrote: > After months of arguing with some platform developers on this subject, the > perl spec was held over my head repeatedly about a few lines that are > causing issues. The basic problem is this line (test-lib-functions.sh, line > 633, still in ffa952497) > >>

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Junio C Hamano
Igor Djordjevic writes: > On 27/02/2018 20:59, Igor Djordjevic wrote: >> >> (3) ---X1---o---o---o---o---o---X2 >>|\ |\ >>| A1---A2---A3---U1 | A1'--A2'--A3'--U1' >>| \ | >>|

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

2018-02-27 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > Teach remote-curl the 'stateless-connect' command which is used to > establish a stateless connection with servers which support protocol > version 2. This allows remote-curl to act as a proxy, allowing the git > client to communicate natively with a remote end,

[Problem] test_must_fail makes possibly questionable assumptions about exit_code.

2018-02-27 Thread Randall S. Becker
Hi all, After months of arguing with some platform developers on this subject, the perl spec was held over my head repeatedly about a few lines that are causing issues. The basic problem is this line (test-lib-functions.sh, line 633, still in ffa952497) >elif test $exit_code -gt 129 &&

Re: [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep

2018-02-27 Thread Ramsay Jones
On 27/02/18 22:05, Junio C Hamano wrote: > Junio C Hamano writes: > >> OK, somehow I had the version from Ramsay on a topic branch that was >> not merged to 'pu'. Here is the replacement for 2/2 I'd be queuing. >> >> We'd need SZEDER to sign it off (optionally correcting

Re: [PATCH 0/5] roll back locks in various code paths

2018-02-27 Thread Junio C Hamano
Martin Ågren writes: > Patches 2-4 are the actual fixes where I teach some functions to always > roll back the lock they're holding. Notably, these are all in "libgit". > > Patch 1 is a "while at it" to use locks on the stack instead of having > them be static. Patch 5

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Igor Djordjevic
On 27/02/2018 20:59, Igor Djordjevic wrote: > > (3) ---X1---o---o---o---o---o---X2 >|\ |\ >| A1---A2---A3---U1 | A1'--A2'--A3'--U1' >| \ | >| M | >| / | >

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

2018-02-27 Thread Junio C Hamano
Jeff King writes: >> struct strs {...}; >> >> void strs_init(struct strs *); >> void strs_push(struct strs *, const char *); >> void strs_pushf(struct strs *, const char *fmt, ...); >> void strs_pushl(struct strs *, ...); >> void strs_pushv(struct strs *, const char **); >> void

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

2018-02-27 Thread Jonathan Nieder
Brandon Williams wrote: > Introduce the transport-helper capability 'stateless-connect'. This > capability indicates that the transport-helper can be requested to run > the 'stateless-connect' command which should attempt to make a > stateless connection with a remote end. Once established, the

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-27 Thread Johannes Schindelin
Hi Buga, thank you for making this a lot more understandable to this thick developer. On Tue, 27 Feb 2018, Igor Djordjevic wrote: > On 27/02/2018 19:55, Igor Djordjevic wrote: > > > > It would be more along the lines of "(1) rebase old merge commit parents, > > (2) generate separate diff

Re: [PATCH v5 0/2] diff: add --compact-summary (aka nd/diff-stat-with-summary)

2018-02-27 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > ... and v5 fixes the commit message of 2/2 where in v4 it still > mentions --stat-with-summary instead of --compact-summary. Sorry. > > Nguyễn Thái Ngọc Duy (2): > diff.c: refactor pprint_rename() to use strbuf > diff: add --compact-summary

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

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

Re: [PATCH] revision.c: reduce object database queries

2018-02-27 Thread Junio C Hamano
Jeff King writes: >> This code comes originally form 454fbbcde3 (git-rev-list: allow missing >> objects when the parent is marked UNINTERESTING, 2005-07-10). But later, >> in aeeae1b771 (revision traversal: allow UNINTERESTING objects to be >> missing, 2009-01-27), we marked dealt

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

2018-02-27 Thread Jonathan Nieder
Brandon Williams wrote: > 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. Makes sense. [...] > --- a/pkt-line.h > +++ b/pkt-line.h > @@ -26,6 +26,7 @@ void packet_buf_flush(struct

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

2018-02-27 Thread Jonathan Nieder
Brandon Williams wrote: > Commit 266f1fdfa (transport-helper: be quiet on read errors from > helpers, 2013-06-21) removed a call to 'die()' which printed the name of > the remote helper passed in to the 'recvline_fh()' function using the > 'name' parameter. Once the call to 'die()' was removed

Re: [PATCH v3 4/9] t3701: don't hard code sha1 hash values

2018-02-27 Thread Junio C Hamano
Phillip Wood writes: > t/t3701-add-interactive.sh | 30 -- > 1 file changed, 20 insertions(+), 10 deletions(-) > > diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh > index bdd1f292a9..46d655038f 100755 > ---

Re: [PATCH v2] sha1_name: fix uninitialized memory errors

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 02:30:39PM -0800, Junio C Hamano wrote: > -- >8 -- > From: Derrick Stolee > Date: Tue, 27 Feb 2018 06:47:04 -0500 > Subject: [PATCH] sha1_name: fix uninitialized memory errors > > During abbreviation checks, we navigate to the position within a >

Re: [PATCH/RFC 1/1] Auto diff of UTF-16 files in UTF-8

2018-02-27 Thread Jeff King
On Mon, Feb 26, 2018 at 06:27:06PM +0100, tbo...@web.de wrote: > @@ -3611,8 +3615,25 @@ int diff_populate_filespec(struct diff_filespec *s, > unsigned int flags) > s->size = size; > s->should_free = 1; > } > - } > - else { > +

Re: [PATCH v3 2/9] t3701: indent here documents

2018-02-27 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > Indent here documents in line with the current style for tests. > > Signed-off-by: Phillip Wood > --- This loses the hand-edit-while-queuing done based on Eric's

Re: [PATCH v2] sha1_name: fix uninitialized memory errors

2018-02-27 Thread Junio C Hamano
Jeff King writes: > Thanks, this looks good to me. > > Semi-related, I wondered also at the weird asymmetry in the if-else, > ... > So I think the code is right, but the comment is wrong. -- >8 -- From: Derrick Stolee Date: Tue, 27 Feb 2018 06:47:04

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 02:10:20PM -0800, Junio C Hamano wrote: > > I thought it solved that by the hosting folks never seeing the strange > > binary-looking data. They see only utf8, which diffs well. > > Ah, OK, that is a "fix" in a wider context (in a narrower context, > "work around" is a

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

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 05:10:09PM -0500, Eric Sunshine wrote: > > That would be fine with me. Though I would love it if we could find a > > shorter name for the associated functions. For example, > > argv_array_pushf() can make lines quite long, and something like > > argv_pushf() is easier to

Re: [PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 11:08:12PM +0100, Martin Ågren wrote: > > So I think it's correct as-is, but I wonder if writing it as: > > > > if (!active_cache_changed) > > rollback_lock_file(_lock); > > else if (write_locked_index(_index, _lock, COMMIT_LOCK)) > > return error(...);

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-27 Thread Junio C Hamano
Jeff King writes: > On Tue, Feb 27, 2018 at 01:55:02PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> > Of the three solutions, I think the relative merits are something like >> > this: >> > ... >> > 3. w-t-e (Lars's patch) >> >> I thought Lars's

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

2018-02-27 Thread Eric Sunshine
On Tue, Feb 27, 2018 at 5:04 PM, Jeff King wrote: > On Tue, Feb 27, 2018 at 01:58:00PM -0800, Junio C Hamano wrote: >> So are we looking for a natural name to call an array of trings? I >> personally do not mind argv_array too much, but perhaps we can call >> it a string_array and

Re: [PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Martin Ågren
On 27 February 2018 at 22:44, Jeff King wrote: > I want to note one thing that confused me while reviewing. While looking > to see if there were other returns, I noticed that the lines right near > the end of your context are funny: > > if (active_cache_changed && >

Re: [PATCH] test_must_be_empty: make sure the file exists, not just empty

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 01:27:29PM -0800, Junio C Hamano wrote: > The helper function test_must_be_empty is meant to make sure the > given file is empty, but its implementation is: > > if test -s "$1" > then > ... not empty, we detected a failure ... > fi > >

Re: Is offloading to GPU a worthwhile feature?

2018-02-27 Thread Stefan Beller
On Tue, Feb 27, 2018 at 12:52 PM, Konstantin Ryabitsev wrote: > compression offload Currently there is a series under review that introduces a commit graph file[1], which would allow to not need decompressing objects for a rev walk, but have the walking

Re: [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep

2018-02-27 Thread Junio C Hamano
Junio C Hamano writes: > OK, somehow I had the version from Ramsay on a topic branch that was > not merged to 'pu'. Here is the replacement for 2/2 I'd be queuing. > > We'd need SZEDER to sign it off (optionally correcting mistakes in > the log message) if we are going with

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

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 01:58:00PM -0800, Junio C Hamano wrote: > Jonathan Nieder writes: > > > Jonathan Tan wrote: > >> On Thu, 22 Feb 2018 13:26:58 -0500 > >> Jeff King wrote: > > > >>> I agree that it shouldn't matter much here. But if the name argv_array

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 01:55:02PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Of the three solutions, I think the relative merits are something like > > this: > > ... > > 3. w-t-e (Lars's patch) > > I thought Lars's w-t-e was about keeping the in-repo contents in >

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

2018-02-27 Thread Junio C Hamano
Jonathan Nieder writes: > Jonathan Tan wrote: >> On Thu, 22 Feb 2018 13:26:58 -0500 >> Jeff King wrote: > >>> I agree that it shouldn't matter much here. But if the name argv_array >>> is standing in the way of using it, I think we should consider giving it

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-27 Thread Junio C Hamano
Jeff King writes: > Of the three solutions, I think the relative merits are something like > this: > ... > 3. w-t-e (Lars's patch) I thought Lars's w-t-e was about keeping the in-repo contents in UTF-8 and externalize in whatever encoding (e.g. UTF-16), so it won't help the

Re: [PATCH 0/5] roll back locks in various code paths

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 10:30:08PM +0100, Martin Ågren wrote: > Patches 2-4 are the actual fixes where I teach some functions to always > roll back the lock they're holding. Notably, these are all in "libgit". > > Patch 1 is a "while at it" to use locks on the stack instead of having > them be

Re: [PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 10:30:10PM +0100, Martin Ågren wrote: > diff --git a/sequencer.c b/sequencer.c > index 90807c4559..e6bac4692a 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -465,8 +465,10 @@ static int do_recursive_merge(struct commit *base, > struct commit *next, >

Re: [PATCH] test_must_be_empty: make sure the file exists, not just empty

2018-02-27 Thread Stefan Beller
On Tue, Feb 27, 2018 at 1:27 PM, Junio C Hamano wrote: > The helper function test_must_be_empty is meant to make sure the > given file is empty, but its implementation is: > > if test -s "$1" > then > ... not empty, we detected a failure ... >

Re: [PATCH v2] sha1_name: fix uninitialized memory errors

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 06:47:04AM -0500, Derrick Stolee wrote: > Peff made an excellent point about the nested if statements. This > goes back to Christian's original recommendation. > > -- >8 -- > > During abbreviation checks, we navigate to the position within a > pack-index that an OID

Re: [PATCH v5 01/12] sequencer: avoid using errno clobbered by rollback_lock_file()

2018-02-27 Thread Martin Ågren
On 26 February 2018 at 22:29, Johannes Schindelin wrote: > As pointed out in a review of the `--recreate-merges` patch series, > `rollback_lock_file()` clobbers errno. Therefore, we have to report the > error message that uses errno before calling said function. > >

[PATCH 3/5] merge-recursive: always roll back lock in `merge_recursive_generic()`

2018-02-27 Thread Martin Ågren
If we return early, we forget to roll back the lockfile. Do so. Signed-off-by: Martin Ågren --- merge-recursive.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/merge-recursive.c b/merge-recursive.c index cc5fa0a949..7345125691 100644 ---

[PATCH 5/5] sequencer: do not roll back lockfile unnecessarily

2018-02-27 Thread Martin Ågren
If `commit_lock_file()` or `hold_lock_file_for_update()` fail, there is no need to call `rollback_lock_file()` on the lockfile. It doesn't hurt either, but it does make different callers in this file inconsistent, which might be confusing. While at it, remove a trailing '.' from a recurring error

[PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Martin Ågren
If we return early, we forget to roll back the lockfile. Do so. Signed-off-by: Martin Ågren --- sequencer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 90807c4559..e6bac4692a 100644 --- a/sequencer.c +++

[PATCH 4/5] merge: always roll back lock in `checkout_fast_forward()`

2018-02-27 Thread Martin Ågren
This function originated in builtin/merge.c. It was moved to merge.c in commit db699a8a1f (Move try_merge_command and checkout_fast_forward to libgit.a, 2012-10-26), but was used from sequencer.c even before that. If a problem occurs, the function returns without rolling back the lockfile. Teach

[PATCH 1/5] sequencer: make lockfiles non-static

2018-02-27 Thread Martin Ågren
After 076aa2cbd (tempfile: auto-allocate tempfiles on heap, 2017-09-05), we can have lockfiles on the stack. One of these functions fails to always roll back the lock. That will be fixed in the next commit. Signed-off-by: Martin Ågren --- sequencer.c | 10 +- 1

[PATCH 0/5] roll back locks in various code paths

2018-02-27 Thread Martin Ågren
Patches 2-4 are the actual fixes where I teach some functions to always roll back the lock they're holding. Notably, these are all in "libgit". Patch 1 is a "while at it" to use locks on the stack instead of having them be static. Patch 5 removes code to roll back locks which are already rolled

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread SZEDER Gábor
On Tue, Feb 27, 2018 at 10:10 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> SZEDER Gábor writes: >> >>> The two test checking 'git mmerge-recursive' in an empty worktree in >>> ... >>>

[PATCH] test_must_be_empty: make sure the file exists, not just empty

2018-02-27 Thread Junio C Hamano
The helper function test_must_be_empty is meant to make sure the given file is empty, but its implementation is: if test -s "$1" then ... not empty, we detected a failure ... fi Surely, the file having non-zero size is a sign that the condition "the file

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 10:05:17PM +0100, Torsten Bögershausen wrote: > The other question is: > Would this help showing diffs of UTF-16 encoded files on a "git hoster", > github/bitbucket/ ? Almost. There's probably one more thing needed. We don't currently read in-tree .gitattributes when

[PATCH v8 30/29] fixup! merge-recursive: apply necessary modifications for directory renames

2018-02-27 Thread Elijah Newren
Use is_null_oid() instead of is_null_sha1() --- This is just a fixup to patch 23/29 in my v8 series for detecting directory renames; should squash cleanly. merge-recursive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread Junio C Hamano
SZEDER Gábor writes: > + git read-tree -i -m $c3 2>actual-err && > + test_must_be_empty expected-err && > + git update-index --ignore-missing --refresh 2>>actual-err && > + test_must_be_empty expected-err && > +

  1   2   >