summaryrefslogtreecommitdiff
path: root/src/clone.c
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-10-16 20:16:21 -0700
committerBen Straub <bs@github.com>2012-10-19 19:34:15 -0700
commit2c8bbb27d91ec35162522079d632608fcaac2a57 (patch)
treea866bf4d5b75b641e2067d298a1422ed2538f11c /src/clone.c
parentd57c47dc07044b4fd3f5e9d57615329692823111 (diff)
downloadlibgit2-2c8bbb27d91ec35162522079d632608fcaac2a57.tar.gz
Convert checkout_index to use progress callback
Diffstat (limited to 'src/clone.c')
-rw-r--r--src/clone.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/clone.c b/src/clone.c
index 215185610..0039b146d 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -248,16 +248,11 @@ cleanup:
-static int setup_remotes_and_fetch(git_repository *repo,
- const char *origin_url,
- git_indexer_stats *fetch_stats)
+static int setup_remotes_and_fetch(git_repository *repo, const char *origin_url)
{
int retcode = GIT_ERROR;
git_remote *origin = NULL;
git_off_t bytes = 0;
- git_indexer_stats dummy_stats;
-
- if (!fetch_stats) fetch_stats = &dummy_stats;
/* Create the "origin" remote */
if (!git_remote_add(&origin, repo, GIT_REMOTE_ORIGIN, origin_url)) {
@@ -327,7 +322,7 @@ static int clone_internal(
}
if (!(retcode = git_repository_init(&repo, path, is_bare))) {
- if ((retcode = setup_remotes_and_fetch(repo, origin_url, fetch_stats)) < 0) {
+ if ((retcode = setup_remotes_and_fetch(repo, origin_url)) < 0) {
/* Failed to fetch; clean up */
git_repository_free(repo);
git_futils_rmdir_r(path, NULL, GIT_DIRREMOVAL_FILES_AND_DIRS);