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  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 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-roll on Friday, Feb 16th.
Please let me know if you are planning on reviewing v3 and need more time
than that.


* Graph Storage:

 - Move the graph files to a different directory than the "pack"
directory. Currently considering ".git/objects/info"

In my copy of git there is already a file

   $ cat .git/objects/info/packs
   P pack-8fdfd126aa8c2a868baf1f89788b07b79a4d365b.pack

which seems to be in line with the information provided in
'man gitrepository-layout':
 objects/info
Additional information about the object store is
recorded in this directory.

The commit graph files are not exactly "additional info about the
object store" but rather "about the objects". Close enough IMO.

Stefan


Thanks for the tip [1]. I was unfamiliar with it because it doesn't 
exist in repos that don't repack.


[1] 
https://git-scm.com/docs/gitrepository-layout/2.12.0#gitrepository-layout-objectsinfopacks


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

2018-02-14 Thread Stefan Beller
On Wed, Feb 14, 2018 at 10:15 AM, Derrick Stolee  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 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-roll on Friday, Feb 16th.
> Please let me know if you are planning on reviewing v3 and need more time
> than that.
>
>
> * Graph Storage:
>
> - Move the graph files to a different directory than the "pack"
> directory. Currently considering ".git/objects/info"

In my copy of git there is already a file

  $ cat .git/objects/info/packs
  P pack-8fdfd126aa8c2a868baf1f89788b07b79a4d365b.pack

which seems to be in line with the information provided in
'man gitrepository-layout':
objects/info
   Additional information about the object store is
   recorded in this directory.

The commit graph files are not exactly "additional info about the
object store" but rather "about the objects". Close enough IMO.

Stefan


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-roll on Friday, Feb 
16th. Please let me know if you are planning on reviewing v3 and need 
more time than that.



* Graph Storage:

    - Move the graph files to a different directory than the "pack" 
directory. Currently considering ".git/objects/info"


    - Change the "--pack-dir" command-line arguments to "--object-dir" 
arguments.


    - Keep a "graph_head" file, but expand on the reasons (as discussed 
[1]) in the commit message.


    - Adjust "graph_head" and the "--graph-id" argument to use a full 
filename (assuming based in {object-dir}/info/).


    - Remove "pack_dir" from struct commit_graph and 
load_commit_graph_one().


    - Drop "git commit-graph clear" subcommand.


* Graph format:

    - remove redundant hash type & length bytes in favor of a combined 
type/length enum byte.


    - emphasize the fact that the file can contain chunk ids unknown to 
Git and will be ignored on read. Also fix the read code to not die() on 
unknown chunk ids.


    - Don't write the large-edge chunk if it is going to be empty. 
Modify tests to verify this.



* Tests:

    - Format (last apostrophe on new line)

    - Bug check (--stdin-commits should limit by reachability)


* Other style fixes.


[1] 
https://public-inbox.org/git/99543db0-26e4-8daa-a580-b618497e4...@gmail.com/