| 4982 | /*** Function Grouping: helper functions for merge_incore_*() ***/ |
| 4983 | |
| 4984 | static struct tree *shift_tree_object(struct repository *repo, |
| 4985 | struct tree *one, struct tree *two, |
| 4986 | const char *subtree_shift) |
| 4987 | { |
| 4988 | struct object_id shifted; |
| 4989 | |
| 4990 | if (!*subtree_shift) { |
| 4991 | shift_tree(repo, &one->object.oid, &two->object.oid, &shifted, 0); |
| 4992 | } else { |
| 4993 | shift_tree_by(repo, &one->object.oid, &two->object.oid, &shifted, |
| 4994 | subtree_shift); |
| 4995 | } |
| 4996 | if (oideq(&two->object.oid, &shifted)) |
| 4997 | return two; |
| 4998 | return lookup_tree(repo, &shifted); |
| 4999 | } |
| 5000 | |
| 5001 | static inline void set_commit_tree(struct commit *c, struct tree *t) |
| 5002 | { |
no test coverage detected