[PATCH v4 5/7] commit/revisions: bookkeeping before refactoring

2018-10-16 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee There are a few things that need to move around a little before making a big refactoring in the topo-order logic: 1. We need access to record_author_date() and compare_commits_by_author_date() in revision.c. These are used currently by sort_in_topological_order() in co

Re: [PATCH v2 13/13] commit-graph: specify OID version for SHA-256

2018-10-16 Thread brian m. carlson
On Tue, Oct 16, 2018 at 11:00:19AM +0900, Junio C Hamano wrote: > "brian m. carlson" writes: > > > Since the commit-graph code wants to serialize the hash algorithm into > > the data store, specify a version number for each supported algorithm. > > Note that we don't use the values of the constan

Re: On overriding make variables from the environment...

2018-10-16 Thread Jonathan Nieder
SZEDER Gábor wrote: > On Tue, Oct 16, 2018 at 02:54:56PM -0700, Jonathan Nieder wrote: >> SZEDER Gábor wrote: >>> Our Makefile has lines like these: >>> >>> CFLAGS = -g -O2 -Wall >>> CC = cc >>> AR = ar >>> SPATCH = spatch [...] >>> I'm not sure what to do. I'm fine with updating our 'ci/

Re: [PATCH v2 13/13] commit-graph: specify OID version for SHA-256

2018-10-16 Thread brian m. carlson
On Tue, Oct 16, 2018 at 06:09:41PM +0200, Duy Nguyen wrote: > On Tue, Oct 16, 2018 at 6:01 PM Derrick Stolee wrote: > > > > On 10/16/2018 11:35 AM, Duy Nguyen wrote: > > > On Mon, Oct 15, 2018 at 4:23 AM brian m. carlson > > > wrote: > > >> Since the commit-graph code wants to serialize the hash

Re: [PATCH v2 00/13] Base SHA-256 implementation

2018-10-16 Thread brian m. carlson
On Tue, Oct 16, 2018 at 01:01:07PM +0900, Junio C Hamano wrote: > "brian m. carlson" writes: > > > t/t0014-hash.sh | 54 > > create mode 100755 t/t0014-hash.sh > > If I am not mistaken, 0014 is already used by another topic in > flight, and will cause test-lint f

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-16 Thread Junio C Hamano
Eric Sunshine writes: >> +test_expect_success 'git branch `--show-current` works properly when tag >> exists' ' >> + cat >expect <<-\EOF && >> + branch-and-tag-name >> + EOF >> + test_when_finished "git branch -D branch-and-tag-name" && >> + git checkout -b branch-a

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-16 Thread Junio C Hamano
René Scharfe writes: > Apart from that the macro is simple and doesn't use any tricks or > added checks. It just sets up boilerplate functions to offer type-safe > sorting. > ... > diff --git a/git-compat-util.h b/git-compat-util.h > index 5f2e90932f..491230fc57 100644 > --- a/git-compat-util.h

Re: What's cooking in git.git (Oct 2018, #02; Sat, 13)

2018-10-16 Thread Junio C Hamano
Josh Steadmon writes: > The first two patches (test cleanup and packet_reader refactor) are OK, > but the latter two will break the archive command when an old client > attempts to talk to a new server (due to the version advertisement > problem noted in [1]). Sorry that I didn't catch that these

Re: [PATCH 17/19] submodule: use submodule repos for object lookup

2018-10-16 Thread Jonathan Tan
> Thanks for the review of the whole series! > > I have redone this series, addressing all your comments. I addressed > this comment differently than suggested, and put the submodule > repository argument at the end of the parameter list, such that it > goes with all the other arguments to be fill

Re: [PATCH 17/19] submodule: use submodule repos for object lookup

2018-10-16 Thread Stefan Beller
On Tue, Oct 16, 2018 at 4:13 PM Jonathan Tan wrote: > > > Thanks for the review of the whole series! > > > > I have redone this series, addressing all your comments. I addressed > > this comment differently than suggested, and put the submodule > > repository argument at the end of the parameter l

Re: problem with not being able to enforce git content filters

2018-10-16 Thread brian m. carlson
On Tue, Oct 16, 2018 at 01:36:37PM -0700, Stas Bekman wrote: > The problem is that it can't be enforced. > > When it's not enforced, we end up with some devs using it and others > don't, or more often is the same dev sometimes doesn't have it configured. > > When a person has a stripped out noteb

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-16 Thread Eric Sunshine
On Tue, Oct 16, 2018 at 7:09 PM Junio C Hamano wrote: > Eric Sunshine writes: > > This cleanup "checkout" needs to be encapsulated within a > > test_when_finished(), doesn't it? Preferably just after the "git > > checkout -b" invocation. > > In the meantime, here is what I'll have in 'pu' on top.

What's cooking in git.git (Oct 2018, #03; Wed, 17)

2018-10-16 Thread Junio C Hamano
I expect to be offline for most of today during the day, so here is the usual report but sent at an unusual time. Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do n

[PATCH 00/19] Bring more repository handles into our code base

2018-10-16 Thread Stefan Beller
This rerolls sb/more-repo-in-api. It applies on nd/the-index merged with ds/reachable and is available via git fetch https://github.com/stefanbeller/git object-store-final-3 I addressed all of Jonathans comments, see range-diff below; the last patch (applying the semantic patches) has been omi

[PATCH 03/19] object-store: allow read_object_file_extended to read from arbitrary repositories

2018-10-16 Thread Stefan Beller
read_object_file_extended is not widely used, so migrate it all at once. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- object-store.h | 5 +++-- sha1-file.c| 11 ++- streaming.c| 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/object-stor

[PATCH 06/19] object: parse_object to honor its repository argument

2018-10-16 Thread Stefan Beller
In 8e4b0b6047 (object.c: allow parse_object to handle arbitrary repositories, 2018-06-28), we forgot to pass the repository down to the read_object_file. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --g

[PATCH 04/19] object-store: prepare read_object_file to deal with arbitrary repositories

2018-10-16 Thread Stefan Beller
As read_object_file is a widely used function (which is also regularly used in new code in flight between master..pu), changing its signature is painful is hard, as other series in flight rely on the original signature. It would burden the maintainer if we'd just change the signature. Introduce re

[PATCH 02/19] packfile: allow has_packed_and_bad to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
has_packed_and_bad is not widely used, so just migrate it all at once. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- packfile.c | 5 +++-- packfile.h | 2 +- sha1-file.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packfile.c b/packfile.c index ebcb5

[PATCH 01/19] sha1_file: allow read_object to read objects in arbitrary repositories

2018-10-16 Thread Stefan Beller
Allow read_object (a file local functon in sha1_file) to handle arbitrary repositories by passing the repository down to oid_object_info_extended. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- sha1-file.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --

[PATCH 09/19] commit-reach.c: allow merge_bases_many to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index 2f7ae20bd4..aacd8cdc1e 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -92,7 +92,9 @@ static struct commit_list *paint_down_to

[PATCH 11/19] commit-reach.c: allow get_merge_bases_many_0 to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index bce4169f1f..df93274966 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -213,7 +213,8 @@ static int remove_redundant(struct re

[PATCH 10/19] commit-reach.c: allow remove_redundant to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index aacd8cdc1e..bce4169f1f 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -153,7 +153,7 @@ struct commit_list *get_octopus_merge_ba

[PATCH 12/19] commit-reach: prepare get_merge_bases to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Similarly to previous patches, the get_merge_base functions are used often in the code base, which makes migrating them hard. Implement the new functions, prefixed with 'repo_' and hide the old functions behind a wrapper macro. Signed-off-by: Stefan Beller --- commit-reach.c

[PATCH 08/19] commit-reach.c: allow paint_down_to_common to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
As the function is file local and not widely used, migrate it all at once. Signed-off-by: Stefan Beller --- commit-reach.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index 5a845440a9..2f7ae20bd4 100644 --- a/commit-reach.c

[PATCH 05/19] object-store: prepare has_{sha1, object}_file[_with_flags] to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- contrib/coccinelle/the_repository.cocci | 29 + object-store.h | 22 ++- sha1-file.c | 15 - 3 files changed, 55 insertions(+), 11 deletions(-) diff --git a/c

[PATCH 07/19] commit: allow parse_commit* to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Just like the previous commit, parse_commit and friends are used a lot and are found in new patches, so we cannot change their signature easily. Re-introduce these function prefixed with 'repo_' that take a repository argument and keep the original as a shallow macro. Signed-off-by: Stefan Beller

[PATCH 17/19] pretty: prepare format_commit_message to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- contrib/coccinelle/the_repository.cocci | 10 ++ pretty.c| 15 --- pretty.h| 7 ++- 3 files changed, 24 insertions(+), 8 deletions(-) diff --gi

[PATCH 18/19] submodule: use submodule repos for object lookup

2018-10-16 Thread Stefan Beller
This converts the 'show_submodule_header' function to use the repository API properly, such that the submodule objects are not added to the main object store. Signed-off-by: Stefan Beller --- submodule.c | 75 ++--- 1 file changed, 60 insertions(+)

[PATCH 19/19] submodule: don't add submodule as odb for push

2018-10-16 Thread Stefan Beller
In push_submodule(), because we do not actually need access to objects in the submodule, do not invoke add_submodule_odb(). (for_each_remote_ref_submodule() does not require access to those objects, and the actual push is done by spawning another process, which handles object access by itself.) Si

[PATCH 14/19] commit: prepare get_commit_buffer to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c| 8 +--- commit.h| 7 ++- contrib/coccinelle/the_repository.cocci | 8 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/commit.c b/commit.c index fe942754e2..c

[PATCH 13/19] commit-reach: prepare in_merge_bases[_many] to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 15 +-- commit-reach.h | 12 ++-- contrib/coccinelle/the_repository.cocci | 16 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/commit-reach.c b

[PATCH 15/19] commit: prepare repo_unuse_commit_buffer to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c| 6 -- commit.h| 7 ++- contrib/coccinelle/the_repository.cocci | 8 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/commit.c b/commit.c index cc5321af8c..8e7

[PATCH 16/19] commit: prepare logmsg_reencode to handle arbitrary repositories

2018-10-16 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- commit.h| 8 contrib/coccinelle/the_repository.cocci | 9 + pretty.c| 13 +++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 0/4] Bloom filter experiment

2018-10-16 Thread Jonathan Tan
> | Implementation | Queries | Maybe | FP # | FP %  | > ||-|---|--|---| > | Szeder | 66095   | 1142  | 256  | 0.38% | > | Jonathan   | 66459   | 107   | 89   | 0.16% | > | Stolee | 53025   | 492   | 479  | 0.90% | > > (Note that we must have

Re: [PATCH 2/3] pack-objects (mingw): demonstrate a segmentation fault with large deltas

2018-10-16 Thread brian m. carlson
On Tue, Oct 16, 2018 at 02:02:50PM -0700, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > There is a problem in the way 9ac3f0e5b3e4 (pack-objects: fix > performance issues on packing large deltas, 2018-07-22) initializes that > mutex in the `packing_data` struct. The

[PATCH] builtin/submodule--helper: remove debugging leftover tracing

2018-10-16 Thread Stefan Beller
I noticed 74d4731da1 (submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree, 2018-08-13) had two leftover debugging statements when reading The coverage report [1]. Remove them. https://public-inbox.org/git/e30a9c05-87d8-1f2b-182c-6d6a5fefe...@gmail.com/ Signed-off-by: Ste

Re: problem with not being able to enforce git content filters

2018-10-16 Thread Stas Bekman
>> And the devs honestly try to do their best to remember to configure the >> filters, but for some reason they disappear for them, don't ask me why, >> I don't know. This is an open source project team, not a work place. > > This sounds like it could be easily solved by continuous integration.

Re: problem with not being able to enforce git content filters

2018-10-16 Thread brian m. carlson
On Tue, Oct 16, 2018 at 04:48:13PM -0700, Stas Bekman wrote: > > >> And the devs honestly try to do their best to remember to configure the > >> filters, but for some reason they disappear for them, don't ask me why, > >> I don't know. This is an open source project team, not a work place. > > >

Re: problem with not being able to enforce git content filters

2018-10-16 Thread Stas Bekman
On 2018-10-16 05:54 PM, brian m. carlson wrote: [...] >> It doesn't help with direct commits to master, since CI would be >> detecting it after it was committed. And when that happens we all know >> that already because 'git pull' fails. > > Typically projects that have CI set up don't allow direc

Re: [PATCH 1/1] subtree: make install targets depend on build targets

2018-10-16 Thread Jonathan Nieder
Hi, Christian Hesse wrote: > --- a/contrib/subtree/Makefile > +++ b/contrib/subtree/Makefile > @@ -69,11 +69,11 @@ install: $(GIT_SUBTREE) [...] > -install-html: $(GIT_SUBTREE_HTML) > +install-html: html This broke the build for me: make[2]: Entering directory '/build/git-

Re: [PATCH] builtin/submodule--helper: remove debugging leftover tracing

2018-10-16 Thread Jonathan Nieder
Stefan Beller wrote: > I noticed 74d4731da1 (submodule--helper: replace connect-gitdir-workingtree > by ensure-core-worktree, 2018-08-13) had two leftover debugging statements > when reading The coverage report [1]. Remove them. > > https://public-inbox.org/git/e30a9c05-87d8-1f2b-182c-6d6a5fefe...

Recommendations for updating error() to error_errno()

2018-10-16 Thread 牛旭
Hi, Our team works on enhance logging practices by learning from historical log  revisions in evolution. And we find three patches that update error(..., strerror(errmp)) to error_errno(...). While applying this rule to git-2.14.2, we find 9 missed spot in file refs/files-backend.c, 1 in apply.c

[PATCH] doc: fix small typo in git show-branch

2018-10-16 Thread Saulius Gurklys
Fix small typo as in document is used not . Signed-off-by: Saulius Gurklys --- Documentation/git-show-branch.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt index 262db049d..4a0137122 100644 --- a/Doc

<    1   2