projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use git-update-ref and git-symbolic-ref in tests
[git.git]
/
local-fetch.c
diff --git
a/local-fetch.c
b/local-fetch.c
index
0dbed89
..
87a93de
100644
(file)
--- a/
local-fetch.c
+++ b/
local-fetch.c
@@
-166,7
+166,10
@@
static int fetch_file(const unsigned char *sha1)
int fetch(unsigned char *sha1)
{
int fetch(unsigned char *sha1)
{
- return fetch_file(sha1) && fetch_pack(sha1);
+ if (has_sha1_file(sha1))
+ return 0;
+ else
+ return fetch_file(sha1) && fetch_pack(sha1);
}
int fetch_ref(char *ref, unsigned char *sha1)
}
int fetch_ref(char *ref, unsigned char *sha1)
@@
-231,6
+234,8
@@
int main(int argc, char **argv)
get_verbosely = 1;
else if (argv[arg][1] == 'w')
write_ref = argv[++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
usage(local_pull_usage);
arg++;