]> git.ipfire.org Git - thirdparty/git.git/commit - notes-merge.c
treewide: replace maybe_tree with accessor methods
authorDerrick Stolee <dstolee@microsoft.com>
Fri, 6 Apr 2018 19:09:38 +0000 (19:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Apr 2018 01:47:16 +0000 (10:47 +0900)
commit2e27bd7731d47b374c1c14b53af07b3bfa39fcac
treec7635d69f1c20bfb0d3a61feebcedca13d9161ad
parent5bb03de102b40d9e564be3a3a39084a550db79cb
treewide: replace maybe_tree with accessor methods

In anticipation of making trees load lazily, create a Coccinelle
script (contrib/coccinelle/commit.cocci) to ensure that all
references to the 'maybe_tree' member of struct commit are either
mutations or accesses through get_commit_tree() or
get_commit_tree_oid().

Apply the Coccinelle script to create the rest of the patch.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
23 files changed:
blame.c
builtin/checkout.c
builtin/diff.c
builtin/fast-export.c
builtin/log.c
builtin/reflog.c
commit-graph.c
contrib/coccinelle/commit.cocci [new file with mode: 0644]
fsck.c
http-push.c
line-log.c
list-objects.c
log-tree.c
merge-recursive.c
notes-merge.c
packfile.c
pretty.c
ref-filter.c
revision.c
sequencer.c
sha1_name.c
tree.c
walker.c