With the --recover option, we verify that we have absolutely
everything reachable from the target, not assuming that things
reachable from refs will be complete.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
int get_history = 0;
int get_all = 0;
int get_verbosely = 0;
+int get_recover = 0;
static unsigned char current_commit_sha1[20];
void pull_say(const char *fmt, const char *hex)
return -1;
}
- for_each_ref(mark_complete);
+ if (!get_recover) {
+ for_each_ref(mark_complete);
+ }
if (interpret_target(target, sha1))
return error("Could not interpret %s as something to pull",
/* Set to be verbose */
extern int get_verbosely;
+/* Set to check on all reachable objects. */
+extern int get_recover;
+
/* Report what we got under get_verbosely */
extern void pull_say(const char *, const char *);
} else if (argv[arg][1] == 'w') {
write_ref = argv[arg + 1];
arg++;
+ } else if (!strcmp(argv[arg], "--recover")) {
+ get_recover = 1;
}
arg++;
}
get_verbosely = 1;
else if (argv[arg][1] == 'w')
write_ref = argv[++arg];
+ else if (!strcmp(argv[arg], "--recover"))
+ get_recover = 1;
else
usage(local_pull_usage);
arg++;
} else if (argv[arg][1] == 'w') {
write_ref = argv[arg + 1];
arg++;
+ } else if (!strcmp(argv[arg], "--recover")) {
+ get_recover = 1;
}
arg++;
}