| 860 | }; |
| 861 | |
| 862 | static int append_similar_ref(const struct reference *ref, void *cb_data) |
| 863 | { |
| 864 | struct similar_ref_cb *cb = (struct similar_ref_cb *)(cb_data); |
| 865 | const char *branch = strrchr(ref->name, '/') + 1; |
| 866 | |
| 867 | /* A remote branch of the same name is deemed similar */ |
| 868 | if (starts_with(ref->name, "refs/remotes/") && |
| 869 | !strcmp(branch, cb->base_ref)) |
| 870 | string_list_append_nodup(cb->similar_refs, |
| 871 | refs_shorten_unambiguous_ref(get_main_ref_store(the_repository), ref->name, 1)); |
| 872 | return 0; |
| 873 | } |
| 874 | |
| 875 | static struct string_list guess_refs(const char *ref) |
| 876 | { |
nothing calls this directly
no test coverage detected