| 2022 | } |
| 2023 | |
| 2024 | void init_checkout_metadata(struct checkout_metadata *meta, const char *refname, |
| 2025 | const struct object_id *treeish, |
| 2026 | const struct object_id *blob) |
| 2027 | { |
| 2028 | memset(meta, 0, sizeof(*meta)); |
| 2029 | if (refname) |
| 2030 | meta->refname = refname; |
| 2031 | if (treeish) |
| 2032 | oidcpy(&meta->treeish, treeish); |
| 2033 | if (blob) |
| 2034 | oidcpy(&meta->blob, blob); |
| 2035 | } |
| 2036 | |
| 2037 | void clone_checkout_metadata(struct checkout_metadata *dst, |
| 2038 | const struct checkout_metadata *src, |
no test coverage detected