* Returns 1 if every object pointed to by the given remote refs is available * locally and reachable from a local ref, and 0 otherwise. */
| 869 | * locally and reachable from a local ref, and 0 otherwise. |
| 870 | */ |
| 871 | static int everything_local(struct fetch_pack_args *args, |
| 872 | struct ref **refs) |
| 873 | { |
| 874 | struct ref *ref; |
| 875 | int retval; |
| 876 | |
| 877 | for (retval = 1, ref = *refs; ref ; ref = ref->next) { |
| 878 | const struct object_id *remote = &ref->old_oid; |
| 879 | struct object *o; |
| 880 | |
| 881 | o = lookup_object(the_repository, remote); |
| 882 | if (!o || !(o->flags & COMPLETE)) { |
| 883 | retval = 0; |
| 884 | print_verbose(args, "want %s (%s)", oid_to_hex(remote), |
| 885 | ref->name); |
| 886 | continue; |
| 887 | } |
| 888 | print_verbose(args, _("already have %s (%s)"), oid_to_hex(remote), |
| 889 | ref->name); |
| 890 | } |
| 891 | |
| 892 | return retval; |
| 893 | } |
| 894 | |
| 895 | static int sideband_demux(int in UNUSED, int out, void *data) |
| 896 | { |
no test coverage detected