diff mbox series

[2/4] glossary: add commit graph description

Message ID 32777cae24de91b0fb873ea04a802630ab85aafe.1657385781.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Add some Glossary terms, and extra renormalize information. | expand

Commit Message

Philip Oakley July 9, 2022, 4:56 p.m. UTC
From: Philip Oakley <philipoakley@iee.email>

Signed-off-by: Philip Oakley <philipoakley@iee.email>
---
 Documentation/glossary-content.txt | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Junio C Hamano July 9, 2022, 9:20 p.m. UTC | #1
"Philip Oakley via GitGitGadget" <gitgitgadget@gmail.com> writes:

> +[[def_commit_graph]]commit graph::
> +	The commit-graph file is a supplemental data structure that
> +	accelerates commit graph walks. The existing Object Data Base (ODB)
> +	is the definitive commit graph. The "commit-graph" file is stored
> +	either in the .git/objects/info directory or in the info directory
> +	of an alternate object database.

While it says nothing technically incorrect, I suspect "The existing
object data base is the definitive commit graph" may invite unneeded
confusion.

I think you wanted to say that the DAG formed by traversing the
pointers recorded in the objects is the authoritative source of
truth and the commit-graph file is merely a precomputed cache and
can be safely lost, but I am not sure the above description conveys
that to anybody who does not already know it.

    The commits in the object data base form a directed acyclic
    graph (DAG) by commits referring to their parent commits.
    Pieces of information from individual commit objects that are
    needed to traverse the DAG are pre-computed in the commit-graph
    file and stored in ...

is my attempt---I am not very happy or proud about it, but it may be
easier to follow.

Thanks.
Philip Oakley July 10, 2022, 9:37 p.m. UTC | #2
Hi Junio,

On 09/07/2022 22:20, Junio C Hamano wrote:
> "Philip Oakley via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> +[[def_commit_graph]]commit graph::
>> +	The commit-graph file is a supplemental data structure that
>> +	accelerates commit graph walks. The existing Object Data Base (ODB)
>> +	is the definitive commit graph. The "commit-graph" file is stored
>> +	either in the .git/objects/info directory or in the info directory
>> +	of an alternate object database.
> While it says nothing technically incorrect, I suspect "The existing
> object data base is the definitive commit graph" may invite unneeded
> confusion.

I probably over-shortened the original text I was summarising
(technical/commit-graph.txt intro).
>
> I think you wanted to say that the DAG formed by traversing the
> pointers recorded in the objects is the authoritative source of
> truth and the commit-graph file is merely a precomputed cache
.. of that graph. *nod*
>  and
> can be safely lost, 

I wasn't particularly thinking of that aspect .. Perhaps more that it
accelerates commit graph walks..
> but I am not sure the above description conveys
> that to anybody who does not already know it.
>
>     The commits in the object data base form a directed acyclic
>     graph (DAG) by commits referring to their parent commits.
>     Pieces of information from individual commit objects that are
>     needed to traverse the DAG are pre-computed in the commit-graph
>     file and stored in ...
>
> is my attempt---I am not very happy or proud about it, but it may be
> easier to follow.

I wanted to keepseparate from the graph file definition, the rather
fuzzy relationship between the overall ODB (staging area, and loads of
other stuff), and the way the DAG is generated, which also needs the
selected refs to start the traverse..

In a wider context, it's not clear to me just how the commit graph file
content is chosen relative to the full depth DAG from all local refs.
The reachability bit maps have a similar info gap.

--
Philip

[sorry for erratic responses - currently isolating with covid]
Philip Oakley Aug. 30, 2022, 2:33 p.m. UTC | #3
On 10/07/2022 22:37, Philip Oakley wrote:
> Hi Junio,
>
> On 09/07/2022 22:20, Junio C Hamano wrote:
>> "Philip Oakley via GitGitGadget" <gitgitgadget@gmail.com> writes:
>>
>>> +[[def_commit_graph]]commit graph::
>>> +	The commit-graph file is a supplemental data structure that
>>> +	accelerates commit graph walks. The existing Object Data Base (ODB)
>>> +	is the definitive commit graph. The "commit-graph" file is stored
>>> +	either in the .git/objects/info directory or in the info directory
>>> +	of an alternate object database.
>> While it says nothing technically incorrect, I suspect "The existing
>> object data base is the definitive commit graph" may invite unneeded
>> confusion.
> I probably over-shortened the original text I was summarising
> (technical/commit-graph.txt intro).

I was looking to outline the concept and how, therefore, it is different
from the reachability bitmaps, and also from the 'canonical' DAG of
Git's commit objects.

I hope to have another go in a couple of weeks time.

>> I think you wanted to say that the DAG formed by traversing the
>> pointers recorded in the objects is the authoritative source of
>> truth and the commit-graph file is merely a precomputed cache
> .. of that graph. *nod*
>>  and
>> can be safely lost, 
> I wasn't particularly thinking of that aspect .. Perhaps more that it
> accelerates commit graph walks..
>> but I am not sure the above description conveys
>> that to anybody who does not already know it.
>>
>>     The commits in the object data base form a directed acyclic
>>     graph (DAG) by commits referring to their parent commits.
>>     Pieces of information from individual commit objects that are
>>     needed to traverse the DAG are pre-computed in the commit-graph
>>     file and stored in ...
>>
>> is my attempt---I am not very happy or proud about it, but it may be
>> easier to follow.
> I wanted to keepseparate from the graph file definition, the rather
> fuzzy relationship between the overall ODB (staging area, and loads of
> other stuff), and the way the DAG is generated, which also needs the
> selected refs to start the traverse..
>
> In a wider context, it's not clear to me just how the commit graph file
> content is chosen relative to the full depth DAG from all local refs.
> The reachability bit maps have a similar info gap.
>
> --
> Philip
>
> [sorry for erratic responses - currently isolating with covid]
>
diff mbox series

Patch

diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index f3342a5ab69..a9e69949a4e 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -75,6 +75,13 @@  state in the Git history, by creating a new commit representing the current
 state of the <<def_index,index>> and advancing <<def_HEAD,HEAD>>
 to point at the new commit.
 
+[[def_commit_graph]]commit graph::
+	The commit-graph file is a supplemental data structure that
+	accelerates commit graph walks. The existing Object Data Base (ODB)
+	is the definitive commit graph. The "commit-graph" file is stored
+	either in the .git/objects/info directory or in the info directory
+	of an alternate object database.
+
 [[def_commit_object]]commit object::
 	An <<def_object,object>> which contains the information about a
 	particular <<def_revision,revision>>, such as <<def_parent,parents>>, committer,