Re: [PATCH v5 09/14] commit.h: add wrapped tags in commit struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ZheNing Hu wrote:

> /*
>  * The size of this struct matters in full repo walk operations like
>  * 'git clone' or 'git gc'. Consider using commit-slab to attach data
>  * to a commit instead of adding new fields here.
>  */
> struct commit {
>         struct object object;
>         timestamp_t date;
>         struct commit_list *parents;
> 
>         /*
>          * If the commit is loaded from the commit-graph file, then this
>          * member may be NULL. Only access it through repo_get_commit_tree()
>          * or get_commit_tree_oid().
>          */
>         struct tree *maybe_tree;
>         unsigned int index;
> };
> 
> According to the instructions above, I wonder if you should use "commit_slab" to
> store part of the data related to the commit object instead of
> modifying the member
> of struct commit itself?
> 
> See:
> https://github.com/git/git/blob/master/commit-slab.h
> https://github.com/git/git/blob/master/commit-slab-impl.h
> https://github.com/git/git/blob/master/commit-slab-decl.h
> https://lore.kernel.org/git/CAOLTT8Q8BEKCVwPDypW1w66P9_xP7QC0T-CnLqamqAL4haGzwA@xxxxxxxxxxxxxx/

Awesome!

Maybe it's what I really need now, I will make a try.

Thanks(比心).



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux