[PATCH/RFC v2 1/1] test-lint: Only use only sed [-n] [-e command] [-f command_file]

2019-01-19 Thread tboegi
From: Torsten Bögershausen From `man sed` (on a Mac OS X box): The -E, -a and -i options are non-standard FreeBSD extensions and may not be available on other operating systems. From `man sed` on a Linux box: REGULAR EXPRESSIONS POSIX.2 BREs should be supported, but they aren't completel

git@vger.kernel.org

2019-01-19 Thread Brandon Richardson
From: Martin Ågren If `git commit-tree HEAD^{tree}` fails on us and produces no output on stdout, we will substitute that empty string and execute `git tag ninth-unsigned`, i.e., we will tag HEAD rather than a newly created object. But we are lucky: we have a signature on HEAD, so we should event

[PATCH v4 2/2] commit-tree: add missing --gpg-sign flag

2019-01-19 Thread Brandon Richardson
Add --gpg-sign option in commit-tree, which was documented, but not implemented, in 55ca3f99ae. Add tests for the --gpg-sign option. Signed-off-by: Brandon Richardson --- builtin/commit-tree.c| 8 +++- t/t7510-signed-commit.sh | 15 --- 2 files changed, 19 insertions(+), 4 d

Re: [PATCH v3] commit-tree: add missing --gpg-sign flag

2019-01-19 Thread Brandon Richardson
Hi Martin, On Sat, 19 Jan 2019 at 17:19, Martin Ågren wrote: > > > Or, a bit simpler: > > > > > > oid=$(echo 10 | git commit-tree -S HEAD^{tree}) && > > > git tag tenth-signed "$oid" > > > > Just noticed your latest email. Do you prefer it this way? > > I think so, yeah. (But who knows what o

Re: [PATCH v3] commit-tree: add missing --gpg-sign flag

2019-01-19 Thread Martin Ågren
Hi Brandon, On Sat, 19 Jan 2019 at 19:05, Brandon Richardson wrote: > > I looked into this test in a bit more detail, and it seems to be quite > > hard to get right. Part of the reason is that `git commit-tree` requires > > a bit more careful use than `git commit`, but part of it is that the > >

[PATCH v6 06/10] commit-graph write: show progress for object search

2019-01-19 Thread Ævar Arnfjörð Bjarmason
Show the percentage progress for the "Finding commits for commit graph" phase for the common case where we're operating on all packs in the repository, as "commit-graph write" or "gc" will do. Before we'd emit on e.g. linux.git with "commit-graph write": Finding commits for commit graph: 6529

[PATCH v6 04/10] commit-graph write: add "Writing out" progress output

2019-01-19 Thread Ævar Arnfjörð Bjarmason
Add progress output to be shown when we're writing out the commit-graph, this adds to the output already added in 7b0f229222 ("commit-graph write: add progress output", 2018-09-17). As noted in that commit most of the progress output isn't displayed on small repositories, but before this change we

[PATCH v6 08/10] commit-graph write: remove empty line for readability

2019-01-19 Thread Ævar Arnfjörð Bjarmason
Remove the empty line between a QSORT(...) and the subsequent oideq() for-loop. This makes it clearer that the QSORT(...) is being done so that we can run the oideq() loop on adjacent OIDs. Amends code added in 08fd81c9b6 ("commit-graph: implement write_commit_graph()", 2018-04-02). Signed-off-by:

[PATCH v6 01/10] commit-graph write: use pack order when finding commits

2019-01-19 Thread Ævar Arnfjörð Bjarmason
Slightly optimize the "commit-graph write" step by using FOR_EACH_OBJECT_PACK_ORDER with for_each_object_in_pack(). See commit [1] and [2] for the facility and a similar optimization for "cat-file". On Linux it is around 5% slower to run: echo 1 >/proc/sys/vm/drop_caches && cat .git/objec

[PATCH v6 02/10] commit-graph: rename "large edges" to "extra edges"

2019-01-19 Thread Ævar Arnfjörð Bjarmason
From: SZEDER Gábor The optional 'Large Edge List' chunk of the commit graph file stores parent information for commits with more than two parents, and the names of most of the macros, variables, struct fields, and functions related to this chunk contain the term "large edges", e.g. write_graph_ch

[PATCH v6 07/10] commit-graph write: add more descriptive progress output

2019-01-19 Thread Ævar Arnfjörð Bjarmason
Make the progress output shown when we're searching for commits to include in the graph more descriptive. This amends code I added in 7b0f229222 ("commit-graph write: add progress output", 2018-09-17). Now, on linux.git, we'll emit this sort of output in the various modes we support: $ git co

[PATCH v6 09/10] commit-graph write: add itermediate progress

2019-01-19 Thread Ævar Arnfjörð Bjarmason
Add progress output to sections of code between "Annotating[...]" and "Computing[...]generation numbers". This can collectively take 5-10 seconds on a large enough repository. On a test repository with I have with ~7 million commits and ~50 million objects we'll now emit: $ ~/g/git/git --exec

[PATCH v6 10/10] commit-graph write: emit a percentage for all progress

2019-01-19 Thread Ævar Arnfjörð Bjarmason
Follow-up 01ca387774 ("commit-graph: split up close_reachable() progress output", 2018-11-19) by making the progress bars in close_reachable() report a completion percentage. This fixes the last occurrence where in the commit graph writing where we didn't report that. The change in 01ca387774 spli

[PATCH v6 03/10] commit-graph: don't call write_graph_chunk_large_edges() unnecessarily

2019-01-19 Thread Ævar Arnfjörð Bjarmason
From: SZEDER Gábor The optional 'Large Edge List' chunk of the commit graph file stores parent information for commits with more than two parents. Since the chunk is optional, write_commit_graph() looks through all commits to find those with more than two parents, and then writes the commit grap

[PATCH v6 05/10] commit-graph write: more descriptive "writing out" output

2019-01-19 Thread Ævar Arnfjörð Bjarmason
Make the "Writing out" part of the progress output more descriptive. Depending on the shape of the graph we either make 3 or 4 passes over it. Let's present this information to the user in case they're wondering what this number, which is much larger than their number of commits, has to do with wr

[PATCH v6 00/10] commit-graph write: progress output improvements

2019-01-19 Thread Ævar Arnfjörð Bjarmason
Improvements since v6: * Integrate my "commit-graph write: use pack order when finding commits" patch, and per Junio's suggestion put it at the start so it's easier to split the two apart. * A signed-off-by of mine was missing on that patch. Fixed. * Replace SZEDER's two patches with hi

Re: Inconsistent Behavior using 'Reference'

2019-01-19 Thread Bret Barkelew
Bump. We really do need to figure this out. Anyone familiar with the behavior of “reference”? Thanks! On Tue, Jan 15, 2019 at 2:24 PM Bret Barkelew wrote: > > The repo/workspace (not the cache, the code we’re going to build) that > we’re trying to initialize uses several submodules. We’ve notic

Re: [PATCH v3] commit-tree: add missing --gpg-sign flag

2019-01-19 Thread Brandon Richardson
Hi Martin, > I looked into this test in a bit more detail, and it seems to be quite > hard to get right. Part of the reason is that `git commit-tree` requires > a bit more careful use than `git commit`, but part of it is that the > tests that we already have for `git commit-tree [-S]` right before

Re: What's cooking in git.git (Jan 2019, #03; Fri, 18)

2019-01-19 Thread Junio C Hamano
Elijah Newren writes: >> On hold. >> cf. > > Is the "on hold" comment still accurate? Not anymore. Back when I wrote it it was unclear to me what the best way forward was (e.g. should one become dependent on the other topic? is it something I can carry a semantic conflict resolution for, in

Re: git add —ignore-errors causes --renormalize

2019-01-19 Thread Torsten Bögershausen
On 17.01.19 17:27, Jeff King wrote: > On Thu, Jan 17, 2019 at 06:22:05PM +0300, Dmitriy Smirnov wrote: > >> Calling `git add —ignore-errors` appears to be equal to calling `git add >> —renormalize`: >> >> Main.java is saved with CRLF in repo >> git config core.autocrlf = input >> >> $ src git:(ma

Re: [PATCH v2 1/1] Use size_t instead of 'unsigned long' for data in memory

2019-01-19 Thread Torsten Bögershausen
On 16.01.19 22:46, Thomas Braun wrote: > Am 20.11.2018 um 06:04 schrieb tbo...@web.de: > > I'm interested in helping getting this forward! > >> What we really need for this patch to fly are this branches: >> mk/use-size-t-in-zlib > > In pu. Junio, is that branch ready for master ? > >> tb/print-s

Re: [PATCH v3] commit-tree: add missing --gpg-sign flag

2019-01-19 Thread Martin Ågren
On Sat, 19 Jan 2019 at 16:46, Martin Ågren wrote: > # commit.gpgsign is still on but this must not be signed > - git tag ninth-unsigned $(echo 9 | git commit-tree HEAD^{tree}) && > + echo 9 | git commit-tree HEAD^{tree} >oid && > + test_line_count = 1 oid && > + git

Re: [PATCH v3] commit-tree: add missing --gpg-sign flag

2019-01-19 Thread Martin Ågren
Hi Brandon, Thanks for a v3. On Sat, 19 Jan 2019 at 04:36, Brandon Richardson wrote: > - if (skip_prefix(arg, "-S", &sign_commit)) > + if(!strcmp(arg, "--gpg-sign")) { (Same nit as Junio about the missing space after "if".) > + sign_commit = ""; Ni

[PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-19 Thread Patrick Hogg
ac77d0c37 ("pack-objects: shrink size field in struct object_entry", 2018-04-14) added an extra usage of read_lock/read_unlock in the newly introduced oe_get_size_slow for thread safety in parallel calls to try_delta(). Unfortunately oe_get_size_slow is also used in serial code, some of which is ca

Re: [PATCH v2 2/2] commit-graph: don't call write_graph_chunk_large_edges() unnecessarily

2019-01-19 Thread Martin Ågren
On Fri, 18 Jan 2019 at 18:23, SZEDER Gábor wrote: > write_commit_graph() unconditionally invokes > write_graph_chunk_large_edges(), even when it was decided earlier that > that chunk won't be written. Strictly speaking there is no bug here, > because write_graph_chunk_large_edges() won't write an