summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5da1606)
raw | patch | inline | side by side (parent: 5da1606)
author | Daniel Barkalow <barkalow@iabervon.org> | |
Tue, 27 Sep 2005 01:38:08 +0000 (21:38 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 27 Sep 2005 07:16:40 +0000 (00:16 -0700) |
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>
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>
fetch.c | patch | blob | history | |
fetch.h | patch | blob | history | |
http-fetch.c | patch | blob | history | |
local-fetch.c | patch | blob | history | |
ssh-fetch.c | patch | blob | history |
index 1a33ae984fe999096b0e06fb66155a19be001346..3e073d3584c25e35da0163689508599659328605 100644 (file)
--- a/fetch.c
+++ b/fetch.c
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",
index e7710e89e710979283f82fe3e67ca1296e70b556..9837a3d03527ed648370f62b706978ad14fd20e5 100644 (file)
--- a/fetch.h
+++ b/fetch.h
/* 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 *);
diff --git a/http-fetch.c b/http-fetch.c
index 57141a8a295dbabee74df4af1f8fd2a41b311130..e6181b0ee603a3b9601a0ffebcfa0bd95632ef9f 100644 (file)
--- a/http-fetch.c
+++ b/http-fetch.c
} else if (argv[arg][1] == 'w') {
write_ref = argv[arg + 1];
arg++;
+ } else if (!strcmp(argv[arg], "--recover")) {
+ get_recover = 1;
}
arg++;
}
diff --git a/local-fetch.c b/local-fetch.c
index 0dbed8910bbc3aa570c512eff893a4c603fdb5f7..a57386ca6a632c2e0a43348ed8b147692746a44f 100644 (file)
--- a/local-fetch.c
+++ b/local-fetch.c
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++;
diff --git a/ssh-fetch.c b/ssh-fetch.c
index 683a1e4a01f250043324ae49fe61cc33470ceb9c..05d3e49f25bc2d5dbce4bcd86c0292e07135063d 100644 (file)
--- a/ssh-fetch.c
+++ b/ssh-fetch.c
} else if (argv[arg][1] == 'w') {
write_ref = argv[arg + 1];
arg++;
+ } else if (!strcmp(argv[arg], "--recover")) {
+ get_recover = 1;
}
arg++;
}