+ /*
+ If that object is complete (i.e. it is a descendant of a
+ local ref), we don't want it, nor its descendants.
+ */
+ if (has_sha1_file(remote)
+ && parse_object(remote)->flags & COMPLETE) {
+ if (rev_command_len + 44 < sizeof(rev_command)) {
+ snprintf(rev_command + rev_command_len, 44,
+ " ^%s^", sha1_to_hex(remote));
+ rev_command_len += 43;
+ }
+