git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
blob fe814f313e48a7390a1e79150796e1be247788c9 687 bytes (raw)
name: contrib/coccinelle/commit.cocci 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
@@
expression c;
@@
- &c->maybe_tree->object.oid
+ get_commit_tree_oid(c)

@@
expression c;
@@
- c->maybe_tree->object.oid.hash
+ get_commit_tree_oid(c)->hash

// These excluded functions must access/modify c->maybe_tree direcly.
// Note that if c->maybe_tree is written somewhere outside of these
// functions, then the recommended transformation will be bogus with
// repo_get_commit_tree() on the LHS.
@@
identifier f !~ "^(repo_get_commit_tree|get_commit_tree_in_graph_one|load_tree_for_commit|fill_commit_in_graph|parse_commit_buffer|release_commit_memory|make_virtual_commit)$";
struct commit *c;
@@
  f(...) {<...
- c->maybe_tree
+ repo_get_commit_tree(the_repository, c)
  ...>}

debug log:

solving fe814f313e ...
found fe814f313e in https://public-inbox.org/git/20190412001730.GM8796@szeder.dev/
found 57c8f71479 in https://public-inbox.org/git/20190406113453.5149-12-pclouds@gmail.com/
found c49aa558f0 in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100644 c49aa558f0fe6b74b9d4d4a7779f0a9f32747388	contrib/coccinelle/commit.cocci

applying [1/2] https://public-inbox.org/git/20190406113453.5149-12-pclouds@gmail.com/
diff --git a/contrib/coccinelle/commit.cocci b/contrib/coccinelle/commit.cocci
index c49aa558f0..57c8f71479 100644


applying [2/2] https://public-inbox.org/git/20190412001730.GM8796@szeder.dev/
diff --git a/contrib/coccinelle/commit.cocci b/contrib/coccinelle/commit.cocci
index 57c8f71479..fe814f313e 100644

Checking patch contrib/coccinelle/commit.cocci...
Applied patch contrib/coccinelle/commit.cocci cleanly.
Checking patch contrib/coccinelle/commit.cocci...
Applied patch contrib/coccinelle/commit.cocci cleanly.

index at:
100644 fe814f313e48a7390a1e79150796e1be247788c9	contrib/coccinelle/commit.cocci

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).