[PATCH v3 11/14] commit: integrate commit graph with commit parsing

2018-02-08 Thread Derrick Stolee
.7s | -88% | | branch -vv | 0.42s | 0.27s | -35% | | rev-list --all | 6.4s | 1.0s | -84% | | rev-list --all --objects | 32.6s | 27.6s | -15% | Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- alloc.c

[PATCH v3 06/14] commit-graph: implement 'git-commit-graph read'

2018-02-08 Thread Derrick Stolee
Teach git-commit-graph to read commit graph files and summarize their contents. Use the read subcommand to verify the contents of a commit graph file in the tests. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/git-commit-graph.txt | 16 builtin/commit-g

[PATCH v3 02/14] graph: add commit graph design document

2018-02-08 Thread Derrick Stolee
Add Documentation/technical/commit-graph.txt with details of the planned commit graph feature, including future plans. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/technical/commit-graph.txt | 189 +++ 1 file changed, 189 inse

[PATCH v3 14/14] commit-graph: build graph from starting commits

2018-02-08 Thread Derrick Stolee
, 700,000+ commits were added to the graph file starting from 'master' in 7-9 seconds, depending on the number of packfiles in the repo (1, 24, or 120). Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/git-commit-graph.txt | 15 ++- builtin/commit-g

[PATCH v3 05/14] commit-graph: implement 'git-commit-graph write'

2018-02-08 Thread Derrick Stolee
Teach git-commit-graph to write graph files. Create new test script to verify this command succeeds without failure. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/git-commit-graph.txt | 39 + builtin/commit-graph.c | 43 +++ t

[PATCH v3 13/14] commit-graph: read only from specific pack-indexes

2018-02-08 Thread Derrick Stolee
Teach git-commit-graph to inspect the objects only in a certain list of pack-indexes within the given pack directory. This allows updating the commit graph iteratively, since we add all commits stored in a previous commit graph. Signed-off-by: Derrick Stolee <dsto...@microsoft.

[PATCH v3 04/14] commit-graph: implement write_commit_graph()

2018-02-08 Thread Derrick Stolee
Teach Git to write a commit graph file by checking all packed objects to see if they are commits, then store the file in the given pack directory. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Makefile | 1 + commit-graph.c

[PATCH v3 10/14] commit-graph: add core.commitGraph setting

2018-02-08 Thread Derrick Stolee
The commit graph feature is controlled by the new core.commitGraph config setting. This defaults to 0, so the feature is opt-in. The intention of core.commitGraph is that a user can always stop checking for or parsing commit graph files if core.commitGraph=0. Signed-off-by: Derrick Stolee <d

[PATCH v3 08/14] commit-graph: implement 'git-commit-graph clear'

2018-02-08 Thread Derrick Stolee
Teach Git to delete the current 'graph_head' file and the commit graph it references. This is a good safety valve if somehow the file is corrupted and needs to be recalculated. Since the commit graph is a summary of contents already in the ODB, it can be regenerated. Signed-off-by: Derrick Stolee

Re: [PATCH v2 11/14] commit: integrate commit graph with commit parsing

2018-02-06 Thread Derrick Stolee
On 2/1/2018 8:51 PM, Jonathan Tan wrote: On Tue, 30 Jan 2018 16:39:40 -0500 Derrick Stolee <sto...@gmail.com> wrote: +/* global storage */ +struct commit_graph *commit_graph = 0; NULL, not 0. +static int bsearch_graph(struct commit_graph *g, struct object_id *oid, uint32_

Re: [PATCH v2 05/14] commit-graph: implement git-commit-graph --write

2018-02-06 Thread Derrick Stolee
On 2/5/2018 1:48 PM, Junio C Hamano wrote: Jeff King writes: The big advantage of your scheme is that you can update the graph index without repacking. The traditional advice has been that you should always do a full repack during a gc (since it gives the most delta

Re: [PATCH v3 00/35] protocol version 2

2018-02-12 Thread Derrick Stolee
I inspected the diff between v2 and v3 and found the changes to be good. Reviewed-By: Derrick Stolee <dsto...@microsoft.com> Thanks, -Stolee

Re: [PATCH v3 07/14] commit-graph: update graph-head during write

2018-02-12 Thread Derrick Stolee
On 2/12/2018 3:37 PM, Junio C Hamano wrote: Junio C Hamano <gits...@pobox.com> writes: Derrick Stolee <sto...@gmail.com> writes: It is possible to have multiple commit graph files in a pack directory, but only one is important at a time. Use a 'graph_head' file to point to the im

Re: [PATCH v2 0/2] Refactor hash search with fanout table

2018-02-13 Thread Derrick Stolee
't do it in this set but it definitely should be done. Thanks. I'll try to remember to do that change when this lands in master. I'll bring the new prototype into my commit-graph patch. Reviewed-By: Derrick Stolee <dsto...@microsoft.com>

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

2018-02-14 Thread Derrick Stolee
On 2/13/2018 8:51 PM, Junio C Hamano wrote: 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 not appear in any of the integration branches, but I am still holding

Re: [PATCH v3 11/14] commit: integrate commit graph with commit parsing

2018-02-14 Thread Derrick Stolee
On 2/13/2018 7:12 PM, Jonathan Tan wrote: On Thu, 8 Feb 2018 15:37:35 -0500 Derrick Stolee <sto...@gmail.com> wrote: | Command | Before | After | Rel % | |--|||---| | log --oneline --topo-order -1000 |

Re: [PATCH v3 00/14] Serialized Git Commit Graph

2018-02-14 Thread Derrick Stolee
There has been a lot of interesting discussion on this topic. Some of that involves some decently significant changes from v3, so I wanted to summarize my understanding of the feedback and seek out more feedback from reviewers before rolling v4. If we have consensus on these topics, then I'll

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

2018-02-14 Thread Derrick Stolee
On 2/14/2018 12:23 PM, Junio C Hamano wrote: Derrick Stolee <sto...@gmail.com> writes: There have been a few "What's cooking" emails since I submitted v1 of "Serialized Git Commit Graph" and it has not appeared with a tracking branch. Is this a mistake, or is it

Re: [PATCH v3 00/14] Serialized Git Commit Graph

2018-02-14 Thread Derrick Stolee
On 2/14/2018 1:27 PM, Stefan Beller wrote: On Wed, Feb 14, 2018 at 10:15 AM, Derrick Stolee <sto...@gmail.com> wrote: There has been a lot of interesting discussion on this topic. Some of that involves some decently significant changes from v3, so I wanted to summarize my underst

Re: [PATCH v3 14/14] commit-graph: build graph from starting commits

2018-02-09 Thread Derrick Stolee
On 2/9/2018 8:02 AM, SZEDER Gábor wrote: On Thu, Feb 8, 2018 at 9:37 PM, Derrick Stolee <sto...@gmail.com> wrote: Teach git-commit-graph to read commits from stdin when the --stdin-commits flag is specified. Commits reachable from these commits are added to the graph. This is a much fast

Re: [PATCH v2 07/14] commit-graph: implement git-commit-graph --update-head

2018-02-05 Thread Derrick Stolee
directory listings to find graph files. Teach git-commit-graph to write 'graph_head' upon writing a new commit graph file. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/git-commit-graph.txt | 34 ++ builtin/commit-graph.c

Re: [PATCH v2 06/14] commit-graph: implement git-commit-graph --read

2018-02-05 Thread Derrick Stolee
On 2/1/2018 7:23 PM, Jonathan Tan wrote: On Tue, 30 Jan 2018 16:39:35 -0500 Derrick Stolee <sto...@gmail.com> wrote: Teach git-commit-graph to read commit graph files and summarize their contents. One overall question - is the "read" command meant to be a command used

Re: [PATCH 025/194] object-store: allow prepare_alt_odb to handle arbitrary repositories

2018-02-06 Thread Derrick Stolee
On 2/5/2018 8:19 PM, brian m. carlson wrote: On Mon, Feb 05, 2018 at 03:54:46PM -0800, Stefan Beller wrote: @@ -434,12 +433,12 @@ static int link_alt_odb_entry_the_repository(const char *entry, ent = alloc_alt_odb(pathbuf.buf); /* add the alternate entry */ -

Re: [PATCH v2 04/14] commit-graph: implement construct_commit_graph()

2018-02-07 Thread Derrick Stolee
On 2/7/2018 10:08 AM, SZEDER Gábor wrote: On Mon, Feb 5, 2018 at 5:06 PM, Derrick Stolee <sto...@gmail.com> wrote: On 2/2/2018 10:32 AM, SZEDER Gábor wrote: In my git repo, with 9 pack files at the moment, i.e. not that big a repo and not that many pack files: $ time ./git commit

Question about get_cached_commit_buffer()

2018-02-20 Thread Derrick Stolee
While working on my commit-graph patch [1] and using a local build in my usual workflows, I found a bug in my branch. Essentially, when calling `git rev-list --header`, the header information is actually missing for many commits except the first. This was not caught in my testing since

Re: Question about get_cached_commit_buffer()

2018-02-21 Thread Derrick Stolee
On 2/20/2018 5:57 PM, Jeff King wrote: On Tue, Feb 20, 2018 at 05:12:50PM -0500, Derrick Stolee wrote: In rev-list, the "--header" option outputs a value and expects the buffer to be cached. It outputs the header info only if get_cached_commit_buffer() returns a non-null buff

Re: [PATCH] commit: drop uses of get_cached_commit_buffer()

2018-02-21 Thread Derrick Stolee
On 2/21/2018 6:13 PM, Jeff King wrote: On Wed, Feb 21, 2018 at 02:17:11PM -0500, Derrick Stolee wrote: The get_cached_commit_buffer() method provides access to the buffer loaded for a struct commit, if it was ever loadead and was not freed. Two places use this to inform how to output

Re: Bug: git log: boundary commits do not respect order (e.g. date-order, topo-order) 2

2018-02-22 Thread Derrick Stolee
On 2/21/2018 6:57 PM, Josh Tepper wrote: When using git log, boundary commits (ie, those commits added by specifying --boundary) do not respect the order (e.g., --date-order, --topo-order). Consider the following commit history, where number indicates the order of the commit timestamps:

Re: [PATCH v3 04/14] commit-graph: implement write_commit_graph()

2018-02-15 Thread Derrick Stolee
On 2/15/2018 1:19 PM, Junio C Hamano wrote: Derrick Stolee <sto...@gmail.com> writes: +struct packed_oid_list { + struct object_id **list; + int nr; + int alloc; +}; What is the typical access pattern for this data structure? If it is pretty much "allocate and

Re: [PATCH v4 04/13] commit-graph: implement write_commit_graph()

2018-02-23 Thread Derrick Stolee
On 2/20/2018 5:57 PM, Junio C Hamano wrote: Derrick Stolee <sto...@gmail.com> writes: +#define GRAPH_OID_VERSION_SHA1 1 +#define GRAPH_OID_LEN_SHA1 20 This hardcoded 20 on the right hand side of this #define is probably problematic. Unless you are planning to possibly store truncate

Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-23 Thread Derrick Stolee
On 2/21/2018 4:34 PM, Stefan Beller wrote: On Mon, Feb 19, 2018 at 10:53 AM, Derrick Stolee <sto...@gmail.com> wrote: graph_name = write_commit_graph(opts.obj_dir); if (graph_name) { if (opts.set_latest) set_latest_file(opts.o

Re: [PATCH v4 07/13] commit-graph: implement --set-latest

2018-02-23 Thread Derrick Stolee
On 2/22/2018 1:31 PM, Junio C Hamano wrote: Derrick Stolee <sto...@gmail.com> writes: static struct opts_commit_graph { const char *obj_dir; const char *graph_file; + int set_latest; } opts; ... @@ -89,6 +106,8 @@ static int graph_write(int argc, const char

Re: [PATCH v4 02/13] graph: add commit graph design document

2018-02-23 Thread Derrick Stolee
On 2/20/2018 4:42 PM, Junio C Hamano wrote: Derrick Stolee <sto...@gmail.com> writes: +2. Walking the entire graph to avoid topological order mistakes. You have at least one more mention of "topological order mistakes" below, but we commonly refer to this issue and blame it

Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-23 Thread Derrick Stolee
On 2/22/2018 1:48 PM, Junio C Hamano wrote: Derrick Stolee <sto...@gmail.com> writes: Teach git-commit-graph to delete the .graph files that are siblings of a newly-written graph file, except for the file referenced by 'graph-latest' at the beginning of the process and the newly-writte

Re: [PATCH v4 03/13] commit-graph: create git-commit-graph builtin

2018-02-23 Thread Derrick Stolee
On 2/21/2018 1:58 PM, Junio C Hamano wrote: Junio C Hamano <gits...@pobox.com> writes: Derrick Stolee <sto...@gmail.com> writes: +int cmd_commit_graph(int argc, const char **argv, const char *prefix) +{ + static struct option builtin_commit_g

Re: [PATCH v4 12/13] commit-graph: read only from specific pack-indexes

2018-02-23 Thread Derrick Stolee
On 2/21/2018 5:25 PM, Stefan Beller wrote: On Mon, Feb 19, 2018 at 10:53 AM, Derrick Stolee <sto...@gmail.com> wrote: Teach git-commit-graph to inspect the objects only in a certain list of pack-indexes within the given pack directory. This allows updating the commit graph iteratively, si

Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-23 Thread Derrick Stolee
On 2/23/2018 2:33 PM, Junio C Hamano wrote: Derrick Stolee <sto...@gmail.com> writes: The (unlikely, but possible) race condition involves two processes (P1 and P2): 1. P1 reads from graph-latest to see commit graph file F1. 2. P2 updates graph-latest to point to F2 and deletes F1.

Re: [PATCH v4 04/13] commit-graph: implement write_commit_graph()

2018-02-23 Thread Derrick Stolee
On 2/23/2018 2:30 PM, Junio C Hamano wrote: Derrick Stolee <sto...@gmail.com> writes: jt/binsearch-with-fanout introduces one when there is a 256-entry fanout table (not the case here). The bsearch() method in search.h (and used in pack-write.c:need_large_offset) does not

[PATCH] commit: drop uses of get_cached_commit_buffer()

2018-02-21 Thread Derrick Stolee
a buffer and hence rev-list will not output the verbose information. These behaviors are undocumented, untested, and unlikely to be expected by users or other software attempting to parse this output. Helped-by: Jeff King <p...@peff.net> Signed-off-by: Derrick Stolee <dsto...@micr

Re: [PATCH v4 01/13] commit-graph: add format document

2018-02-21 Thread Derrick Stolee
On 2/21/2018 2:23 PM, Stefan Beller wrote: On Mon, Feb 19, 2018 at 10:53 AM, Derrick Stolee <sto...@gmail.com> wrote: +In order to allow extensions that add extra data to the graph, we organize +the body into "chunks" and provide a binary lookup table at the beginning +of the

Re: [PATCH] commit: drop uses of get_cached_commit_buffer()

2018-02-21 Thread Derrick Stolee
On 2/21/2018 2:17 PM, Derrick Stolee wrote: The get_cached_commit_buffer() method provides access to the buffer loaded for a struct commit, if it was ever loadead and was not freed. Two places use this to inform how to output information about commits. log-tree.c uses this method to short

[PATCH v4 07/13] commit-graph: implement --set-latest

2018-02-19 Thread Derrick Stolee
obust than relying on directory scanning and modified times. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/git-commit-graph.txt | 10 ++ builtin/commit-graph.c | 26 -- commit-graph.c | 7 +++

[PATCH v4 04/13] commit-graph: implement write_commit_graph()

2018-02-19 Thread Derrick Stolee
Teach Git to write a commit graph file by checking all packed objects to see if they are commits, then store the file in the given object directory. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Makefile | 1 + commit-graph.c

[PATCH v4 05/13] commit-graph: implement 'git-commit-graph write'

2018-02-19 Thread Derrick Stolee
Teach git-commit-graph to write graph files. Create new test script to verify this command succeeds without failure. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/git-commit-graph.txt | 40 + builtin/commit-graph.c | 43 +- t

[PATCH v4 02/13] graph: add commit graph design document

2018-02-19 Thread Derrick Stolee
Add Documentation/technical/commit-graph.txt with details of the planned commit graph feature, including future plans. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/technical/commit-graph.txt | 185 +++ 1 file changed, 185 inse

[PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-19 Thread Derrick Stolee
be using that file. In a multi-process environment, we expect the previoius graph file to be used by a concurrent process, so we do not delete it to avoid race conditions. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/git-commit-graph.txt | 11 +-- builtin/

[PATCH v4 06/13] commit-graph: implement git commit-graph read

2018-02-19 Thread Derrick Stolee
Teach git-commit-graph to read commit graph files and summarize their contents. Use the read subcommand to verify the contents of a commit graph file in the tests. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/git-commit-graph.txt | 15 + builtin/commit-g

[PATCH v4 00/13] Serialized Git Commit Graph

2018-02-19 Thread Derrick Stolee
y toggling the 'core.commitgraph' setting. [1] https://public-inbox.org/git/d154319e-bb9e-b300-7c37-27b1dcd2a...@jeffhostetler.com/ Re: What's cooking in git.git (Jan 2018, #03; Tue, 23) [2] https://github.com/derrickstolee/git/pull/2 A GitHub pull request containing the latest version

[PATCH v4 03/13] commit-graph: create git-commit-graph builtin

2018-02-19 Thread Derrick Stolee
Teach git the 'commit-graph' builtin that will be used for writing and reading packed graph files. The current implementation is mostly empty, except for an '--object-dir' option. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- .gitignore | 1 + Documen

[PATCH v4 09/13] commit-graph: add core.commitGraph setting

2018-02-19 Thread Derrick Stolee
The commit graph feature is controlled by the new core.commitGraph config setting. This defaults to 0, so the feature is opt-in. The intention of core.commitGraph is that a user can always stop checking for or parsing commit graph files if core.commitGraph=0. Signed-off-by: Derrick Stolee <d

[PATCH v4 10/13] commit-graph: close under reachability

2018-02-19 Thread Derrick Stolee
Teach write_commit_graph() to walk all parents from the commits discovered in packfiles. This prevents gaps given by loose objects or previously-missed packfiles. Also automatically add commits from the existing graph file, if it exists. Signed-off-by: Derrick Stolee <dsto...@microsoft.

[PATCH v4 12/13] commit-graph: read only from specific pack-indexes

2018-02-19 Thread Derrick Stolee
Teach git-commit-graph to inspect the objects only in a certain list of pack-indexes within the given pack directory. This allows updating the commit graph iteratively, since we add all commits stored in a previous commit graph. Signed-off-by: Derrick Stolee <dsto...@microsoft.

[PATCH v4 11/13] commit: integrate commit graph with commit parsing

2018-02-19 Thread Derrick Stolee
.7s | -88% | | branch -vv | 0.42s | 0.27s | -35% | | rev-list --all | 6.4s | 1.0s | -84% | | rev-list --all --objects | 32.6s | 27.6s | -15% | Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- alloc.c

[PATCH v4 13/13] commit-graph: build graph from starting commits

2018-02-19 Thread Derrick Stolee
commits. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/git-commit-graph.txt | 15 ++- builtin/commit-graph.c | 27 +-- commit-graph.c | 26 -- commit-graph.h

[PATCH v4 01/13] commit-graph: add format document

2018-02-19 Thread Derrick Stolee
r commit would cause an extra level of indirection for every merge commit. (Octopus merges suffer from this indirection, but they are very rare.) Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- Documentation/technical/commit-graph-format.txt | 90 + 1 file changed

Re: [PATCH v4 03/13] commit-graph: create git-commit-graph builtin

2018-02-26 Thread Derrick Stolee
On 2/26/2018 11:25 AM, SZEDER Gábor wrote: Teach git the 'commit-graph' builtin that will be used for writing and reading packed graph files. The current implementation is mostly empty, except for an '--object-dir' option. Since 'git commit-graph' is a builtin command, it shouldn't show up in

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

2018-02-24 Thread Derrick Stolee
On 2/24/2018 8:34 PM, Derrick Stolee wrote: In mark_parents_uninteresting(), we check for the existence of an object file to see if we should treat a commit as parsed. The result is to set the "parsed" bit on the commit. Modify the condition to only check has_object_file() if the re

[PATCH] revision.c: reduce object database queries

2018-02-24 Thread Derrick Stolee
~60,000 commits, we find the performance of "git status" went from 1.42 seconds to 1.32 seconds, for a relative difference of -7.0%. Signed-off-by: Derrick Stolee <dsto...@microsoft.com> --- revision.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 06/23] midx: struct midxed_git and 'read' subcommand

2018-06-20 Thread Derrick Stolee
On 6/7/2018 1:54 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 4:03 PM, Derrick Stolee wrote: As we build the multi-pack-index feature by adding chunks at a time, we want to test that the data is being written correctly. Create struct midxed_git to store an in-memory representation

Re: [PATCH 06/23] midx: struct midxed_git and 'read' subcommand

2018-06-20 Thread Derrick Stolee
On 6/7/2018 2:31 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 4:03 PM, Derrick Stolee wrote: diff --git a/Documentation/git-midx.txt b/Documentation/git-midx.txt index dcaeb1a91b..919283fdd8 100644 --- a/Documentation/git-midx.txt +++ b/Documentation/git-midx.txt @@ -23,6 +23,11 @@ OPTIONS

Re: [PATCH 10/23] midx: write a lookup into the pack names chunk

2018-06-21 Thread Derrick Stolee
On 6/9/2018 12:43 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 7:01 PM Derrick Stolee wrote: Signed-off-by: Derrick Stolee --- Documentation/technical/pack-format.txt | 5 +++ builtin/midx.c | 7 midx.c | 56

Re: [PATCH 09/23] midx: write pack names in chunk

2018-06-21 Thread Derrick Stolee
On 6/7/2018 2:26 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 4:03 PM, Derrick Stolee wrote: @@ -74,6 +80,31 @@ struct midxed_git *load_midxed_git(const char *object_dir) m->num_chunks = *(m->data + 6); m->num_packs = get_be32(m->data + 8); + for (

Re: [PATCH 11/23] midx: sort and deduplicate objects from packfiles

2018-06-21 Thread Derrick Stolee
On 6/9/2018 1:07 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 4:06 PM Derrick Stolee wrote: Before writing a list of objects and their offsets to a multi-pack-index (MIDX), we need to collect the list of objects contained in the packfiles. There may be multiple copies of some objects, so

Re: [PATCH 13/23] midx: write object id fanout chunk

2018-06-21 Thread Derrick Stolee
On 6/9/2018 1:28 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 4:06 PM Derrick Stolee wrote: @@ -117,9 +123,13 @@ struct midxed_git *load_midxed_git(const char *object_dir) die("MIDX missing required pack lookup chunk"); if (!m->chunk_pack_names)

Re: [PATCH 17/23] midx: read objects from multi-pack-index

2018-06-21 Thread Derrick Stolee
On 6/9/2018 1:56 PM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 6:55 PM Derrick Stolee wrote: Signed-off-by: Derrick Stolee --- midx.c | 96 -- midx.h | 2 ++ object-store.h | 1 + packfile.c | 8 - 4 files changed

Re: [PATCH 2/5] commit-graph: add missing forward declaration

2018-06-21 Thread Derrick Stolee
On 6/21/2018 6:39 PM, Jonathan Tan wrote: Both this and the previous patch look good to me; you seem to have better (stricter) checking for missing includes/forward declarations, am I missing a compile option? (I have DEVELOPER=1 in config.mak) Thanks. No I don't - I discovered that these were

Re: [PATCH 5/5] commit-graph: add repo arg to graph readers

2018-06-21 Thread Derrick Stolee
On 6/21/2018 8:33 PM, Derrick Stolee wrote: On 6/21/2018 7:06 PM, Jonathan Tan wrote: diff --git a/commit.c b/commit.c index 0030e79940..38c12b002f 100644 --- a/commit.c +++ b/commit.c @@ -317,7 +317,7 @@ struct tree *get_commit_tree(const struct commit *commit) if (commit->graph_

Re: [PATCH 5/5] commit-graph: add repo arg to graph readers

2018-06-21 Thread Derrick Stolee
On 6/21/2018 7:06 PM, Jonathan Tan wrote: diff --git a/commit.c b/commit.c index 0030e79940..38c12b002f 100644 --- a/commit.c +++ b/commit.c @@ -317,7 +317,7 @@ struct tree *get_commit_tree(const struct commit *commit) if (commit->graph_pos == COMMIT_NOT_FROM_GRAPH)

Re: The state of the object store series

2018-06-21 Thread Derrick Stolee
[My email client says I sent this two days ago, but it doesn't appear on public-inbox.org, so somehow it didn't land on-list (Stefan pointed out that the message was in HTML). Repeating the message now so I can reference it in another discussion. -Stolee] On 6/19/2018 6:07 PM, Stefan Beller

Re: [PATCH 01/15] contrib: add cocci script to replace index compat macros

2018-06-19 Thread Derrick Stolee
Duy, Here is the patch that was generated by `make coccicheck`. Thanks, -Stolee -->8-- --- builtin/add.c +++ /tmp/cocci-output-206193-4c91ec-add.c @@ -38,13 +38,13 @@ static void chmod_pathspec(struct pathsp { int i; - for (i = 0; i < active_nr; i++) { - struct

Re: [PATCH 00/15] Kill the_index part 1, expose it

2018-06-19 Thread Derrick Stolee
On 6/16/2018 1:41 AM, Nguyễn Thái Ngọc Duy wrote: This is the beginning of the end of the_index. The problem with the_index is it lets library code anywhere access it freely. This is not good because from high level you may not realize that the_index is being used while you don't want to touch

Re: [PATCH 01/15] contrib: add cocci script to replace index compat macros

2018-06-19 Thread Derrick Stolee
On 6/16/2018 1:41 AM, Nguyễn Thái Ngọc Duy wrote: Index compat macros are going to be removed to expose the_index and then reorganized to use the right index instead of simply the_index because sometimes we want to use a different index. This cocci script can help with the first step. It can be

Re: [PATCH 05/23] midx: write header information to lockfile

2018-06-19 Thread Derrick Stolee
On 6/12/2018 11:00 AM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 7:01 PM Derrick Stolee wrote: diff --git a/midx.c b/midx.c index 616af66b13..3e55422a21 100644 --- a/midx.c +++ b/midx.c @@ -1,9 +1,62 @@ #include "git-compat-util.h" #include "cache.h" #include &qu

Re: [PATCH v2 17/18] commit-reach: make can_all_from_reach... linear

2018-08-01 Thread Derrick Stolee
On 7/23/2018 4:41 PM, Jonathan Tan wrote: + if (parse_commit(list[i]) || + list[i]->generation < min_generation) Here... + if (parse_commit(parent->item) || + parent->item->date

ds/reachable (was Re: What's cooking in git.git (Jul 2018, #03; Wed, 25))

2018-08-01 Thread Derrick Stolee
On 7/25/2018 6:13 PM, Junio C Hamano wrote: * ds/reachable (2018-07-20) 18 commits - commit-reach: use can_all_from_reach - commit-reach: make can_all_from_reach... linear - commit-reach: replace ref_newer logic - test-reach: test commit_contains - test-reach: test

Re: [PATCH v2 00/18] Consolidate reachability logic

2018-08-01 Thread Derrick Stolee
On 7/20/2018 6:16 PM, Stefan Beller wrote: * Use single rev-parse commands in test output, and pipe the OIDs through 'sort' Why do we need to sort them? The order of the answers given by rev-parse is the same as the input given and we did not need to sort it before, i.e. the unit under test

ds/multi-pack-index (was Re: What's cooking in git.git (Jul 2018, #03; Wed, 25))

2018-08-01 Thread Derrick Stolee
On 7/25/2018 6:13 PM, Junio C Hamano wrote: * ds/multi-pack-index (2018-07-20) 23 commits - midx: clear midx on repack - packfile: skip loading index if in multi-pack-index - midx: prevent duplicate packfile loads - midx: use midx in approximate_object_count - midx: use existing midx

Re: [PATCH 4/7] for_each_packed_object: support iterating in pack-order

2018-08-15 Thread Derrick Stolee
On 8/10/2018 7:15 PM, Jeff King wrote: diff --git a/commit-graph.c b/commit-graph.c index b0a55ad128..69a0d1c203 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -730,7 +730,7 @@ void write_commit_graph(const char *obj_dir, die("error adding pack %s",

Re: [PATCH 0/7] speeding up cat-file by reordering object access

2018-08-15 Thread Derrick Stolee
On 8/10/2018 7:07 PM, Jeff King wrote: The general idea is that accessing objects in packfile order is way kinder to the delta base cache, and thus way more efficient. See patches 4 and 7 in particular for discussion and numbers. I'm primarily interested in cat-file, so this series is focused

Measuring Community Involvement (was Re: Contributor Summit planning)

2018-08-14 Thread Derrick Stolee
   93  SZEDER Gábor     78  Derrick Stolee     76  Martin Ågren     66  Michael Haggerty     61  Eric Sunshine     46  Christian Couder     36  Phillip Wood     35  Jonathan Nieder     33  Thomas Gummerer 2. Number of other commit tag-lines (Reviewed-By, Helped-By, Reported-By, etc.).

Re: What's cooking in git.git (Aug 2018, #03; Wed, 15)

2018-08-16 Thread Derrick Stolee
On 8/15/2018 7:01 PM, Junio C Hamano wrote: * ds/commit-graph-with-grafts (2018-07-19) 8 commits (merged to 'next' on 2018-08-02 at 0ee624e329) + commit-graph: close_commit_graph before shallow walk + commit-graph: not compatible with uninitialized repo + commit-graph: not compatible

Re: [PATCH] t5318: use 'test_cmp_bin' to compare commit-graph files

2018-08-13 Thread Derrick Stolee
to contain Thanks, Szeder! I didn't know about test_cmp_bin, and I appreciate you keeping up test hygiene. Reviewed-by: Derrick Stolee

Re: [PATCH] t5318: avoid unnecessary command substitutions

2018-08-13 Thread Derrick Stolee
git repo "$(git -C repo rev-parse one)" >actual && - echo $(git -C repo rev-parse one^{tree}) >expect && + git -C repo rev-parse one^{tree} >expect && test_cmp expect actual ' These make sense and are good examples for future test patterns. Thanks, Szeder. Reviewed-by: Derrick Stolee

Re: Contributor Summit planning

2018-08-13 Thread Derrick Stolee
On 8/13/2018 12:31 PM, Jeff King wrote: For the past several years, we've held a Git Contributor Summit as part of the Git Merge conference. I'd like to get opinions from the community to help plan future installments. Any feedback or opinion is welcome, but some obvious things to think about:

[PATCH v2 6/8] commit-graph: not compatible with grafts

2018-08-20 Thread Derrick Stolee
Augment commit_graph_compatible(r) to return false when the given repository r has commit grafts or is a shallow clone. Test that in these situations we ignore existing commit-graph files and we do not write new commit-graph files. Helped-by: Jakub Narebski Signed-off-by: Derrick Stolee

[PATCH v2 0/8] Clarify commit-graph and grafts/replace/shallow incompatibilities

2018-08-20 Thread Derrick Stolee
...@mail.gmail.com/ Stefan's response recommending we keep the first two commits. Derrick Stolee (6): commit-graph: update design document test-repository: properly init repo commit-graph: not compatible with replace objects commit-graph: not compatible with grafts commit-graph

[PATCH v2 7/8] commit-graph: not compatible with uninitialized repo

2018-08-20 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- commit-graph.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commit-graph.c b/commit-graph.c index c4eaedf4e5..cee2caab5c 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -62,6 +62,9 @@ extern int read_replace_refs; static int

[PATCH v2 2/8] refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback

2018-08-20 Thread Derrick Stolee
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Derrick Stolee --- builtin/replace.c | 8 refs.c| 9 - refs.h| 2 +- replace-object.c | 5 +++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/builtin/replace.c b

[PATCH v2 5/8] commit-graph: not compatible with replace objects

2018-08-20 Thread Derrick Stolee
-graph. However, we do ensure that we write a new commit-graph by setting read_replace_refs to 0, thereby ignoring the replace refs. Signed-off-by: Derrick Stolee --- builtin/commit-graph.c | 4 commit-graph.c | 21 + replace-object.c| 2 +- replace

[PATCH v2 3/8] commit-graph: update design document

2018-08-20 Thread Derrick Stolee
to and reads from the commit-graph file when these other features exist. Signed-off-by: Derrick Stolee --- Documentation/technical/commit-graph.txt | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/technical/commit-graph.txt b/Documentation/technical

[PATCH v2 4/8] test-repository: properly init repo

2018-08-20 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- t/helper/test-repository.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/t/helper/test-repository.c b/t/helper/test-repository.c index 2762ca6562..6a84a53efb 100644 --- a/t/helper/test-repository.c +++ b/t/helper/test

[PATCH v2 8/8] commit-graph: close_commit_graph before shallow walk

2018-08-20 Thread Derrick Stolee
ent this interaction. Signed-off-by: Derrick Stolee --- commit-graph.c | 8 commit-graph.h | 1 + upload-pack.c | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/commit-graph.c b/commit-graph.c index cee2caab5c..4bd1a4abbf 100644 --- a/commit-graph.c +++ b/commi

Re: What's cooking in git.git (Aug 2018, #04; Fri, 17)

2018-08-20 Thread Derrick Stolee
On 8/20/2018 1:26 PM, Junio C Hamano wrote: Jonathan Nieder writes: Usually, I refrain from merging larger topics in 'next' down to 'master' when we get close to -rc0, but I am wondering if it is better to merge all of them to 'master', even the ones on the larger and possibly undercooked

[PATCH v2 1/8] refs.c: migrate internal ref iteration to pass thru repository argument

2018-08-20 Thread Derrick Stolee
-by: Derrick Stolee --- refs.c | 39 +-- refs.h | 10 ++ refs/iterator.c | 6 +++--- refs/refs-internal.h | 5 +++-- 4 files changed, 53 insertions(+), 7 deletions(-) diff --git a/refs.c b/refs.c index 457fb78057..7cd76f72d2

[PATCH 4/9] midx: stop reporting garbage

2018-08-20 Thread Derrick Stolee
When prepare_packed_git is called with the report_garbage method initialized, we report unexpected files in the objects directory as garbage. Stop reporting the multi-pack-index and the pack-files it covers as garbage. Signed-off-by: Derrick Stolee --- packfile.c | 7 --- 1 file changed, 4

[PATCH 3/9] midx: mark bad packed objects

2018-08-20 Thread Derrick Stolee
list when reading an object. Now, do both. Signed-off-by: Derrick Stolee --- midx.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/midx.c b/midx.c index 6824acf5f8..7fa75a37a3 100644 --- a/midx.c +++ b/midx.c @@ -280,6 +280,16 @@ static int nth_midxed_pack_entry(struct

[PATCH 7/9] treewide: use get_all_packs

2018-08-20 Thread Derrick Stolee
. Signed-off-by: Derrick Stolee --- builtin/count-objects.c | 2 +- builtin/fsck.c | 4 ++-- builtin/gc.c | 4 ++-- builtin/pack-objects.c | 14 +++--- builtin/pack-redundant.c | 4 ++-- fast-import.c| 4 ++-- http-backend.c | 4 ++-- pack

[PATCH 9/9] pack-objects: consider packs in multi-pack-index

2018-08-20 Thread Derrick Stolee
these copies and mark them as unwanted. Signed-off-by: Derrick Stolee --- builtin/pack-objects.c | 28 t/t5319-multi-pack-index.sh | 8 +++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 1a896d7810

[PATCH 2/9] multi-pack-index: store local property

2018-08-20 Thread Derrick Stolee
that load and prepare multi- pack-indexes. Signed-off-by: Derrick Stolee --- midx.c| 11 ++- midx.h| 6 -- packfile.c| 4 ++-- t/helper/test-read-midx.c | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git

[PATCH 8/9] midx: test a few commands that use get_all_packs

2018-08-20 Thread Derrick Stolee
by a multi-pack-index. Signed-off-by: Derrick Stolee --- t/t5319-multi-pack-index.sh | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh index 4b6e2825a6..424d0c640f 100755 --- a/t/t5319-multi-pack

<    1   2   3   4   5   6   7   8   9   10   >