Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-08-26 02:35:52 +0400
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-08-26 02:42:28 +0400
commit2b175ca972f2531e5ef46d24abeb831d90033a33 (patch)
tree873955c2c00479a19396406c77f805a5545845cc /src/fetch.c
parentcc1d85d1da7fd0e51ea0e3ddfbe516c043c95731 (diff)
indexer: kill git_indexer_stats.data_received
It's not really needed with the current code as we have EOS and the sideband's flush to tell us we're done. Keep the distinction between processed and received objects.
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/fetch.c b/src/fetch.c
index 4c7e82545..278ba3c50 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -306,10 +306,7 @@ static int no_sideband(git_indexer_stream *idx, gitno_buffer *buf, git_off_t *by
return -1;
*bytes += recvd;
- } while(recvd > 0 && stats->data_received);
-
- if (!stats->data_received)
- giterr_set(GITERR_NET, "Early EOF while downloading packfile");
+ } while(recvd > 0);
if (git_indexer_stream_finalize(idx, stats))
return -1;
@@ -374,13 +371,10 @@ int git_fetch__download_pack(
git__free(pkt);
break;
}
- } while (!stats->data_received);
-
- if (!stats->data_received)
- giterr_set(GITERR_NET, "Early EOF while downloading packfile");
+ } while (1);
- if (git_indexer_stream_finalize(idx, stats))
- return -1;
+ if (git_indexer_stream_finalize(idx, stats) < 0)
+ goto on_error;
git_indexer_stream_free(idx);
return 0;