ent in my skills in this world, but the feature is worthless
if it does not improve the user experience.
Thanks,
-Stolee
Derrick Stolee (12):
Commits 01-07 focus on the 'git commit-graph verify' subcommand. These
are ready for full, rigorous review.
commit-graph: add 'verify' subcommand
co
On 5/10/2018 7:56 AM, Jeff King wrote:
On Thu, May 10, 2018 at 07:23:13PM +0900, Junio C Hamano wrote:
This one was doing
ptr = xmalloc(sizeof(*another_ptr))
and it was OK because ptr and another_ptr happened to be of the same
type. I wonder if we are making it safer, or making it
On 5/10/2018 3:00 AM, Junio C Hamano wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
We use the lockfile API to avoid multiple Git processes from writing to
the commit-graph file in the .git/objects/info directory. In some cases,
this directory may not exist, so we check f
On 5/9/2018 10:42 AM, Jeff King wrote:
On Wed, May 09, 2018 at 02:15:38PM +, Derrick Stolee wrote:
The commit-graph file lives in the .git/objects/info directory.
Previously, a failure to acquire the commit-graph.lock file was
assumed to be due to the lack of the info directory, so a mkdir
On 5/9/2018 10:33 AM, Christian Couder wrote:
Hi,
I might start working on implementing reftable in Git soon.
During the last Git Merge conference last March Stefan talked about
reftable. In Alex Vandiver's notes [1] it is asked that people
announce it on the list when they start working on
fatal: cannot mkdir .git/objects/info: File exists"
Rearrange the expectations of this directory existing to avoid
this error, and instead show the typical message when a lockfile
already exists.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.c | 24 ---
e manually to continue.
This patch is based on ds/generation-numbers
Derrick Stolee (1):
commit-graph: fix UX issue when .lock file exists
commit-graph.c | 24
1 file changed, 8 insertions(+), 16 deletions(-)
base-commit: 7547b95b4fbb8591726b1d9381c176cc27fc6aea
--
On 5/7/2018 10:58 AM, Junio C Hamano wrote:
* ds/generation-numbers (2018-05-02) 11 commits
- commit-graph.txt: update design document
- merge: check config before loading commits
- commit: use generation number in remove_redundant()
- commit: add short-circuit to paint_down_to_common()
//public-inbox.org/git/alpine.DEB.2.20.1803091557510.23109@alexmv-linux/
I think it was what Derrick Stolee was talking about at the end of his
part of "Making Git for Windows" presentation at Git Merge 2018:
https://youtu.be/oOMzi983Qmw?t=1835
This was also mentioned in subthread of &quo
On 5/2/2018 8:42 AM, Derrick Stolee wrote:
On 5/1/2018 2:40 PM, Ævar Arnfjörð Bjarmason wrote:
The biggest change in v3 is the no change at all to the code, but a
lengthy explanation of why I didn't go for Derrick's simpler
implementation. Maybe I'm wrong about that, but I felt uneasy
On 5/2/2018 9:05 AM, Jakub Narebski wrote:
Derrick Stolee <sto...@gmail.com> writes:
For a copy of the Linux repository, we measured the following
performance improvements:
git merge-base v3.3 v4.5
Before: 234 ms
After: 208 ms
Rel %: -11%
git merg
On 5/1/2018 2:40 PM, Ævar Arnfjörð Bjarmason wrote:
The biggest change in v3 is the no change at all to the code, but a
lengthy explanation of why I didn't go for Derrick's simpler
implementation. Maybe I'm wrong about that, but I felt uneasy
offloading undocumented (or if I documented it, it
On 5/1/2018 8:47 AM, Derrick Stolee wrote:
The static remove_redundant() method is used to filter a list
of commits by removing those that are reachable from another
commit in the list. This is used to remove all possible merge-
bases except a maximal, mutually independent set.
To determine
On 5/1/2018 10:10 AM, Ævar Arnfjörð Bjarmason wrote:
Actually I'm having second thoughts about that and thinking I might keep
my original approach (with a better explanation).
A few more lines of code seems worthwhile in order to not break the
assumptions a documented API is making, no matter
On 5/1/2018 9:39 AM, Ævar Arnfjörð Bjarmason wrote:
On Tue, May 01 2018, Derrick Stolee wrote:
From: Ævar Arnfjörð Bjarmason <ava...@gmail.com>
Here is what I mean by sorting during for_each_abbrev(). This seems to work for
me, so I don't know what the issue is with this one-pass ap
On 5/1/2018 8:36 AM, Ævar Arnfjörð Bjarmason wrote:
On Tue, May 01 2018, Derrick Stolee wrote:
How would sorting in our custom order before de-duplicating fail the
de-duplication? We will still pair identical OIDs as consecutive
elements and oid_array_for_each_unique only cares about
¶rð Bjarmason <ava...@gmail.com>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
sha1-name.c | 31 +
t/t1512-rev-parse-disambiguation.sh | 21 +++
2 files changed, 52 insertions(+)
diff --git a/sha1-name.c
--contains' was tested:
Before: 60.0s
After: 0.4s
Rel %: -99.3%
Reported-by: Jeff King <p...@peff.net>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/commit.c b/commit.c
index 39a3749abd
The in_commit_list() method does not check the parents of
the candidate for containment in the list. Fix the comment
that incorrectly states that it does.
Reported-by: Jakub Narebski <jna...@gmail.com>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
ref-filter.c | 2 +-
1
After: 0.13s
Rel %: -38%
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/commit.c b/commit.c
index 3ecdc13356..9875feec01 100644
--- a/commit.c
+++ b/commit.c
@@ -808,11 +8
commits to the commit-graph file.
If a computed generation number would exceed GENERATION_NUMBER_MAX, then
use GENERATION_NUMBER_MAX instead.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.c | 43 +++
1 file changed, 43 inse
the given buffer. Only fill this information when specified by the
'check_graph' parameter.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.c | 46 +++---
commit-graph.h | 8
commit.c | 7 +--
commit.h
-by: Derrick Stolee <dsto...@microsoft.com>
---
Documentation/technical/commit-graph.txt | 29
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/Documentation/technical/commit-graph.txt
b/Documentation/technical/commit-graph.txt
index 0550c6d0dc..e1a883eb46
ruct commit *
for (i = 0; i < nr_reference; i++) {
if (parse_commit(reference[i]))
return ret;
- if (min_generation > reference[i]->generation)
+ if (reference[i]->generation < min_generation)
is contained in v4.13
but no earlier tag, the command 'git tag --contains HEAD' had the
following peformance improvement:
Before: 0.81s
After: 0.04s
Rel %: -95%
Helped-by: Jeff King <p...@peff.net>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
ref-filter.c | 24 +++
in remove_redundant(). The relative
change in performance differs as expected.
Reported-by: Jakub Narebski <jna...@gmail.com>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/commit.c b/commit.c
index 9875feec01
test to t5318-commit-graph.sh that exercises this code path to
prevent a regression.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
builtin/merge.c | 7 ---
t/t5318-commit-graph.sh | 9 +
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/builtin/merge.
-by: Derrick Stolee <dsto...@microsoft.com>
---
alloc.c| 1 +
commit-graph.c | 2 ++
commit.h | 4
3 files changed, 7 insertions(+)
diff --git a/alloc.c b/alloc.c
index cf4f8b61e1..e8ab14f4a1 100644
--- a/alloc.c
+++ b/alloc.c
@@ -94,6 +94,7 @@ void *alloc_commit_nod
ers avoids this extra
effort, even if it is somewhat rare.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 20 +++-
commit.h | 1 +
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/commit.c b/commit.c
index 711f674c18..4d00b0a1d6 100644
--- a/commit.
On 5/1/2018 7:27 AM, Ævar Arnfjörð Bjarmason wrote:
On Tue, May 01 2018, Derrick Stolee wrote:
On 4/30/2018 6:07 PM, Ævar Arnfjörð Bjarmason wrote:
Since we show the commit data in the output that's nicely aligned once
we sort by object type. The decision to show tags before commits is
pretty
On 4/29/2018 6:14 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
Most code paths load commits using lookup_commit() and then
parse_commit().
And this automatically loads commit graph if needed, thanks to changes
in parse_commit_gently(), which parse_commit(
On 4/29/2018 5:08 AM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
While preparing commits to be written into a commit-graph file, compute
the generation numbers using a depth-first strategy.
Sidenote: for generation numbers it does not matter if we use
depth
On 4/30/2018 7:32 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
We now calculate generation numbers in the commit-graph file and use
them in paint_down_to_common().
Expand the section on generation numbers to discuss how the three
special generation n
On 4/30/2018 6:54 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
Now that we use generation numbers from the commit-graph, we must
ensure that all commits that exist in the commit-graph are loaded
from that file instead of from the object database. Since the
On 4/30/2018 6:19 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
When running 'git branch --contains', the in_merge_bases_many()
method calls paint_down_to_common() to discover if a specific
commit is reachable from a set of branches. Commits with lower
gene
ons(-)
This is a good series. Please take a look at my suggestion in Patch 4/9,
but feel free to keep this series as written.
Reviewed-by: Derrick Stolee <dsto...@microsoft.com>
On 4/30/2018 6:07 PM, Ævar Arnfjörð Bjarmason wrote:
Change the output emitted when an ambiguous object is encountered so
that we show tags first, then commits, followed by trees, and finally
blobs. Within each type we show objects in hashcmp(). Before this
change the objects were only ordered
On 4/27/2018 12:03 PM, SZEDER Gábor wrote:
Szia Feri,
I'm moving the IRC discussion here, because this might be a bug report
in the end. So, kindly try these steps (103 MB free space required):
$ git clone https://github.com/ClusterLabs/pacemaker.git && cd pacemaker
[...]
$ git branch
On 4/28/2018 6:35 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
The generation number of a commit is defined recursively as follows:
* If a commit A has no parents, then the generation number of A is one.
* If a commit A has parents, then the generation
t.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
I applied this locally on 'next' and ran the check. I succeeded with no
changes.
Thanks!
Reviewed-by: Derrick Stolee <dsto...@microsoft.com>
---
contrib/coccinelle/commit.cocci | 10 --
1 file changed, 4 inse
On 4/26/2018 8:58 AM, Derrick Stolee wrote:
n 4/25/2018 10:35 PM, Junio C Hamano wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
@@ -439,6 +439,9 @@ static void write_graph_chunk_data(struct
hashfile *f, int hash_len,
else
packedDate[
n 4/25/2018 10:35 PM, Junio C Hamano wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
@@ -439,6 +439,9 @@ static void write_graph_chunk_data(struct hashfile *f, int
hash_len,
else
packedDate[0] = 0;
+ if ((*list)->g
On 4/25/2018 1:43 PM, Brandon Williams wrote:
On 04/25, Ævar Arnfjörð Bjarmason wrote:
* bw/protocol-v2 (2018-03-15) 35 commits
(merged to 'next' on 2018-04-11 at 23ee234a2c)
+ remote-curl: don't request v2 when pushing
+ remote-curl: implement stateless-connect command
+ http:
As promised, here is the diff from v3.
Thanks,
-Stolee
-- >8 --
diff --git a/builtin/merge.c b/builtin/merge.c
index 7e1da6c6ea..b819756946 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1148,6 +1148,7 @@ int cmd_merge(int argc, const char **argv, const
char *prefix)
branch =
test to t5318-commit-graph.sh that exercises this code path to
prevent a regression.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
builtin/merge.c | 7 ---
t/t5318-commit-graph.sh | 9 +
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/builtin/merge.
-by: Derrick Stolee <dsto...@microsoft.com>
---
Documentation/technical/commit-graph.txt | 30 +++-
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/Documentation/technical/commit-graph.txt
b/Documentation/technical/commit-graph.txt
index 0550c6d0dc..d9f2713efa
ers avoids this extra
effort, even if it is somewhat rare.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 20 +++-
commit.h | 1 +
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/commit.c b/commit.c
index 711f674c18..4d00b0a1d6 100644
--- a/commit.
--contains' was tested:
Before: 60.0s
After: 0.4s
Rel %: -99.3%
Reported-by: Jeff King <p...@peff.net>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/commit.c b/commit.c
index 39a3749abd
the given buffer. Only fill this information when specified by the
'check_graph' parameter.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.c | 45 ++---
commit-graph.h | 8
commit.c | 7 +--
commit.h
After: 0.13s
Rel %: -38%
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/commit.c b/commit.c
index 7bb007f56a..e2e16ea1a7 100644
--- a/commit.c
+++ b/commit.c
@@ -808,11 +8
is containd in v4.13
but no earlier tag, the command 'git tag --contains HEAD' had the
following peformance improvement:
Before: 0.81s
After: 0.04s
Rel %: -95%
Helped-by: Jeff King <p...@peff.net>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
ref-filter.c | 24 +++
-by: Derrick Stolee <dsto...@microsoft.com>
---
alloc.c| 1 +
commit-graph.c | 2 ++
commit.h | 4
3 files changed, 7 insertions(+)
diff --git a/alloc.c b/alloc.c
index cf4f8b61e1..e8ab14f4a1 100644
--- a/alloc.c
+++ b/alloc.c
@@ -94,6 +94,7 @@ void *alloc_commit_nod
for 'git tag --contains), providing a
significant speedup (at least 95% for some cases).
A more substantial refactoring of revision.c is required before making
'git log --graph' use generation numbers effectively.
This patch series is built on ds/lazy-load-trees.
Derrick Stolee (10):
ref-filter:
commits to the commit-graph file.
If a computed generation number would exceed GENERATION_NUMBER_MAX, then
use GENERATION_NUMBER_MAX instead.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.c | 45 +
1 file changed, 45 inse
The in_commit_list() method does not check the parents of
the candidate for containment in the list. Fix the comment
that incorrectly states that it does.
Reported-by: Jakub Narebski <jna...@gmail.com>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
ref-filter.c | 2 +-
1
On 4/24/2018 2:56 PM, Jakub Narebski wrote:
Derrick Stolee <sto...@gmail.com> writes:
One way to fix this is to call 'prepare_commit_graph()' directly and
then test that 'commit_graph' is non-null before performing any
parses. I'm not thrilled with how that couples the commit
On 4/23/2018 5:38 PM, Jakub Narebski wrote:
Derrick Stolee <sto...@gmail.com> writes:
On 4/18/2018 7:19 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
[...]
[...], and this saves time during 'git branch --contains' queries
that would otherwise
On 4/18/2018 8:04 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
-- >8 --
This is the one of several "small" patches that follow the serialized
Git commit graph patch (ds/commit-graph) and lazy-loading trees
(ds/lazy-load-trees).
As describ
On 4/18/2018 8:02 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
Most code paths load commits using lookup_commit() and then
parse_commit(). In some cases, including some branch lookups, the commit
is parsed using parse_object_buffer() which side-steps parse_
On 4/18/2018 7:19 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
[...]
[...], and this saves time during 'git branch --contains' queries
that would otherwise walk "around" the commit we are inspecting.
If I understand the code properly, what happen
On 4/18/2018 6:15 PM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
The containment algorithm for 'git branch --contains' is different
from that for 'git tag --contains' in that it uses is_descendant_of()
instead of contains_tag_algo(). The expensive p
On 4/18/2018 5:02 PM, Jakub Narebski wrote:
Here I can offer only the cursory examination, as I don't know this area
of code in question.
Derrick Stolee <dsto...@microsoft.com> writes:
A commit A can reach a commit B only if the generation number of A
is larger than the generation numbe
On 4/21/2018 4:44 PM, Jakub Narebski wrote:
Jakub Narebski <jna...@gmail.com> writes:
Derrick Stolee <sto...@gmail.com> writes:
On 4/11/2018 3:32 PM, Jakub Narebski wrote:
What would you suggest as a good test that could imply performance? The
Google Colab notebook linked to ab
On 4/19/2018 2:41 PM, Stefan Beller wrote:
On Thu, Apr 19, 2018 at 11:35 AM, Elijah Newren wrote:
On Thu, Apr 19, 2018 at 10:57 AM, Elijah Newren wrote:
This series is a reboot of the directory rename detection series that was
merged to master and then
On 4/18/2018 10:31 AM, Jakub Narebski wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
Define compare_commits_by_gen_then_commit_date(), which uses generation
numbers as a primary comparison and commit date to break ties (or as a
comparison when both commits do not have co
to say "this one is good" with good
enough understanding of both the issue the series addresses and the
solution in the series.
I'm sorry that my second message was terse. My response to v1 [1] was
> I looked through these patches and only found one set of whitespace >
errors. Compi
On 4/17/2018 2:10 PM, Derrick Stolee wrote:
The commit-graph feature is not useful to end users until the
commit-graph file is maintained automatically by Git during normal
upkeep operations. One natural place to trigger this write is during
'git gc'.
Before automatically generating a commit
that file in
advance. We perform this parse now to ensure the object cache contains
only commits from this commit-graph file.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.c | 34 ++
1 file changed, 34 insertions(+)
diff --git a/commit-g
This RFC is based on v3 of ds/generation-numbers, and the first commit
is a fixup! based on a bug in that version that I caught while prepping
this series.
Thanks,
-Stolee
Derrick Stolee (12):
fixup! commit-graph: always load commit-graph information
commit-graph: add 'check' subcommand
co
During a run of 'git commit-graph check', list the issues with the
header information in the commit-graph file. Some of this information
is inferred from the loaded 'struct commit_graph'.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.
-trivial 'git gc' command.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
Documentation/git-gc.txt | 4
builtin/gc.c | 8
2 files changed, 12 insertions(+)
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index 571b5a7e3c..17dd654a59
documentation. Add a simple test that ensures the command returns
a zero error code.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
Documentation/git-commit-graph.txt | 7 +-
builtin/commit-graph.c | 38 ++
commit-graph.c
calculation is correct for all
commits in the commit-graph file.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.c | 82 ++
1 file changed, 82 insertions(+)
diff --git a/commit-graph.c b/commit-graph.c
index 80a2
If a commit-graph file exists, check its contents during 'git fsck'.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
builtin/fsck.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/builtin/fsck.c b/builtin/fsck.c
index ef78c6c00c..9712f230ba 100644
--- a/b
is explicit in avoiding commits from the
commit-graph file.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 14 ++
commit.h | 1 +
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/commit.c b/commit.c
index 9ef6f699bd..07752d8503
---
commit-graph.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/commit-graph.c b/commit-graph.c
index 21e853c21a..3f0c142603 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -304,7 +304,7 @@ static int find_commit_in_graph(struct commit *item, struct
commit_graph *g,
' after performing cleanup of the
object database.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
Documentation/git-commit-graph.txt | 8 --
builtin/commit-graph.c | 41 +++---
t/t5318-commit-graph.sh| 10
3 files chang
When lazy-loading a tree for a commit, it will be important to select
the tree from a specific struct commit_graph. Create a new method that
specifies the commit-graph file and use that in
get_commit_tree_in_graph().
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.
The commit-graph feature is now integrated with 'fsck' and 'gc',
so remove those items from the "Future Work" section of the
commit-graph design document.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
Documentation/technical/commit-graph.txt | 9 -
1 file chan
Before checking a commit-graph file against the object database, we
need to parse all commits from the given commit-graph file. Create
parse_commit_in_graph_one() to target a given struct commit_graph.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.
On 4/17/2018 1:00 PM, Derrick Stolee wrote:
Most code paths load commits using lookup_commit() and then
parse_commit(). In some cases, including some branch lookups, the commit
is parsed using parse_object_buffer() which side-steps parse_commit() in
favor of parse_commit_buffer
test to t5318-commit-graph.sh that exercises this code path to
prevent a regression.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
builtin/merge.c | 5 +++--
t/t5318-commit-graph.sh | 9 +
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/builtin/merge.
in v4.13
but no earlier tag, the command 'git tag --contains HEAD' had the
following peformance improvement:
Before: 0.81s
After: 0.04s
Rel %: -95%
Helped-by: Jeff King <p...@peff.net>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
ref-filter.c | 23 +++
-by: Derrick Stolee <dsto...@microsoft.com>
---
Documentation/technical/commit-graph.txt | 30 +++-
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/Documentation/technical/commit-graph.txt
b/Documentation/technical/commit-graph.txt
index 0550c6d0dc..d9f2713efa
After: 0.13s
Rel %: -38%
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/commit.c b/commit.c
index bceb79c419..a70f120878 100644
--- a/commit.c
+++ b/commit.c
@@ -805,11 +8
commits to the commit-graph file.
If a computed generation number would exceed GENERATION_NUMBER_MAX, then
use GENERATION_NUMBER_MAX instead.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit-graph.c | 46 ++
1 file changed, 46 inse
the given buffer. Only fill this information when specified by the
'check_graph' parameter. This avoids duplicate work when we already
checked the graph in parse_commit_gently() or when simply checking the
buffer contents in check_commit().
Signed-off-by: Derrick Stolee <dsto...@microsoft.
-by: Derrick Stolee <dsto...@microsoft.com>
---
alloc.c| 1 +
commit-graph.c | 2 ++
commit.h | 4
3 files changed, 7 insertions(+)
diff --git a/alloc.c b/alloc.c
index cf4f8b61e1..e8ab14f4a1 100644
--- a/alloc.c
+++ b/alloc.c
@@ -94,6 +94,7 @@ void *alloc_commit_nod
--contains' was tested:
Before: 60.0s
After: 0.4s
Rel %: -99.3%
Reported-by: Jeff King <p...@peff.net>
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/commit.c b/commit.c
index a44899c733
h series is build on ds/lazy-load-trees.
Derrick Stolee (9):
commit: add generation number to struct commmit
commit-graph: compute generation numbers
commit: use generations in paint_down_to_common()
commit-graph.txt: update design document
ref-filter: use generation number for --contains
ers avoids this extra
effort, even if it is somewhat rare.
Signed-off-by: Derrick Stolee <dsto...@microsoft.com>
---
commit.c | 20 +++-
commit.h | 1 +
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/commit.c b/commit.c
index 711f674c18..a44899c733 100644
--- a/commit.
On 4/11/2018 8:21 PM, Stefan Beller wrote:
v3:
* interdiff below,
the only changes are renaming the variable
- struct ref_store *main_ref_store;
+ struct ref_store *refs;
in struct repository.
as well as dropping the file rename patch.
* improved commit messages from
On 4/12/2018 5:12 AM, Junio C Hamano wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
+Here is a diagram to visualize the shape of the full commit graph, and
+how different generation numbers relate:
+
++-+
+| GENERATION_NUMBER_IN
On 4/11/2018 4:58 PM, Jakub Narebski wrote:
Derrick Stolee <sto...@gmail.com> writes:
+CHUNK DATA:
+
+ OID Fanout (ID: {'O', 'I', 'D', 'F'}) (256 * 4 bytes)
+ The ith entry, F[i], stores the number of OIDs with first
+ byte at most i. Thus F[255] stores the total
+
On 4/11/2018 4:20 PM, Thomas Gummerer wrote:
Instead of just mentioning 'git blame' and 'git shortlog', which make it
quite hard for new contributors to pick out the appropriate list of
people to cc on their patch series, mention the 'git contacts' utility,
which makes it much easier to get a
On 4/11/2018 3:32 PM, Jakub Narebski wrote:
What would you suggest as a good test that could imply performance? The
Google Colab notebook linked to above includes a function to count
number of commits (nodes / vertices in the commit graph) walked,
currently in the worst case scenario.
The two
On 4/10/2018 11:02 PM, Junio C Hamano wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
@@ -800,17 +810,26 @@ static struct commit_list *paint_down_to_common(struct
commit *one, int n, struc
return result;
}
prio_queue_put(, one);
+ i
On 4/10/2018 10:51 PM, Junio C Hamano wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
+ if ((*list)->generation != GENERATION_NUMBER_INFINITY) {
+ if ((*list)->generation > GENERATION_NUMBER_MAX)
+ die(&qu
On 4/10/2018 10:31 PM, Junio C Hamano wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
The generation number of a commit is defined recursively as follows:
* If a commit A has no parents, then the generation number of A is one.
* If a commit A has parents, then the generation
On 4/10/2018 10:12 PM, Junio C Hamano wrote:
Derrick Stolee <dsto...@microsoft.com> writes:
diff --git a/builtin/merge.c b/builtin/merge.c
index ee050a47f3..20897f8223 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1183,13 +1183,14 @@ int cmd_merge(int argc, const char **argv,
901 - 1000 of 1362 matches
Mail list logo