projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge-recursive: conflicting rename case.
[git.git]
/
http-fetch.c
diff --git
a/http-fetch.c
b/http-fetch.c
index
53a7dbf
..
3cd6ef9
100644
(file)
--- a/
http-fetch.c
+++ b/
http-fetch.c
@@
-637,10
+637,18
@@
static int fetch_indices(struct alt_base *repo)
if (start_active_slot(slot)) {
run_active_slot(slot);
if (slot->curl_result != CURLE_OK) {
if (start_active_slot(slot)) {
run_active_slot(slot);
if (slot->curl_result != CURLE_OK) {
- free(buffer.buffer);
- return error("%s", curl_errorstr);
+ if (slot->http_code == 404) {
+ repo->got_indices = 1;
+ free(buffer.buffer);
+ return 0;
+ } else {
+ repo->got_indices = 0;
+ free(buffer.buffer);
+ return error("%s", curl_errorstr);
+ }
}
} else {
}
} else {
+ repo->got_indices = 0;
free(buffer.buffer);
return error("Unable to start request");
}
free(buffer.buffer);
return error("Unable to start request");
}
@@
-650,7
+658,7
@@
static int fetch_indices(struct alt_base *repo)
switch (data[i]) {
case 'P':
i++;
switch (data[i]) {
case 'P':
i++;
- if (i + 52 < buffer.posn &&
+ if (i + 52 <
=
buffer.posn &&
!strncmp(data + i, " pack-", 6) &&
!strncmp(data + i + 46, ".pack\n", 6)) {
get_sha1_hex(data + i + 6, sha1);
!strncmp(data + i, " pack-", 6) &&
!strncmp(data + i + 46, ".pack\n", 6)) {
get_sha1_hex(data + i + 6, sha1);
@@
-659,7
+667,7
@@
static int fetch_indices(struct alt_base *repo)
break;
}
default:
break;
}
default:
- while (data[i] != '\n')
+ while (
i < buffer.posn &&
data[i] != '\n')
i++;
}
i++;
i++;
}
i++;
@@
-914,6
+922,8
@@
int main(int argc, char **argv)
int arg = 1;
int rc = 0;
int arg = 1;
int rc = 0;
+ setup_git_directory();
+
while (arg < argc && argv[arg][0] == '-') {
if (argv[arg][1] == 't') {
get_tree = 1;
while (arg < argc && argv[arg][0] == '-') {
if (argv[arg][1] == 't') {
get_tree = 1;