diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fetch.c | 4 | ||||
| -rw-r--r-- | src/transports/smart_protocol.c | 4 | ||||
| -rw-r--r-- | src/transports/ssh.c | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/fetch.c b/src/fetch.c index 5bf2b93c1..c7d2c83a1 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -42,8 +42,10 @@ static int maybe_want(git_remote *remote, git_remote_head *head, git_odb *odb, g return 0; /* If we have the object, mark it so we don't ask for it */ - if (git_odb_exists(odb, &head->oid)) + if (git_odb_exists(odb, &head->oid)) { head->local = 1; + remote->need_pack = 0; + } else remote->need_pack = 1; diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c index dd9b5e0ed..7e8fcdd92 100644 --- a/src/transports/smart_protocol.c +++ b/src/transports/smart_protocol.c @@ -579,6 +579,10 @@ int git_smart__download_pack( done: if (writepack) writepack->free(writepack); + if (progress_cb) { + t->packetsize_cb = NULL; + t->packetsize_payload = NULL; + } return error; } diff --git a/src/transports/ssh.c b/src/transports/ssh.c index 37f17080a..bece0b45d 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c @@ -53,6 +53,7 @@ static void ssh_error(LIBSSH2_SESSION *session, const char *errmsg) static int gen_proto(git_buf *request, const char *cmd, const char *url) { char *repo; + int len; if (!git__prefixcmp(url, prefix_ssh)) { url = url + strlen(prefix_ssh); @@ -67,7 +68,7 @@ static int gen_proto(git_buf *request, const char *cmd, const char *url) return -1; } - int len = strlen(cmd) + 1 /* Space */ + 1 /* Quote */ + strlen(repo) + 1 /* Quote */ + 1; + len = strlen(cmd) + 1 /* Space */ + 1 /* Quote */ + strlen(repo) + 1 /* Quote */ + 1; git_buf_grow(request, len); git_buf_printf(request, "%s '%s'", cmd, repo); |
