* Given a commit and a path in it, create a new origin structure. * The callers that add blame to the scoreboard should use * get_origin() to obtain shared, refcounted copy instead of calling * this function directly. */
| 70 | * this function directly. |
| 71 | */ |
| 72 | static struct blame_origin *make_origin(struct commit *commit, const char *path) |
| 73 | { |
| 74 | struct blame_origin *o; |
| 75 | FLEX_ALLOC_STR(o, path, path); |
| 76 | o->commit = commit; |
| 77 | o->refcnt = 1; |
| 78 | o->next = get_blame_suspects(commit); |
| 79 | set_blame_suspects(commit, o); |
| 80 | return o; |
| 81 | } |
| 82 | |
| 83 | /* |
| 84 | * Locate an existing origin or create a new one. |
no test coverage detected