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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--upload-pack.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 07c150595e..878254d72f 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -60,7 +60,7 @@ static void create_pack_file(void)
close(fd[1]);
*p++ = "git-rev-list";
*p++ = "--objects";
- if (MAX_NEEDS <= nr_needs)
+ if (create_full_pack || MAX_NEEDS <= nr_needs)
*p++ = "--all";
else {
for (i = 0; i < nr_needs; i++) {
@@ -69,12 +69,13 @@ static void create_pack_file(void)
buf += 41;
}
}
- for (i = 0; i < nr_has; i++) {
- *p++ = buf;
- *buf++ = '^';
- memcpy(buf, sha1_to_hex(has_sha1[i]), 41);
- buf += 41;
- }
+ if (!create_full_pack)
+ for (i = 0; i < nr_has; i++) {
+ *p++ = buf;
+ *buf++ = '^';
+ memcpy(buf, sha1_to_hex(has_sha1[i]), 41);
+ buf += 41;
+ }
*p++ = NULL;
execvp("git-rev-list", argv);
die("git-upload-pack: unable to exec git-rev-list");