summaryrefslogtreecommitdiff
path: root/sys/src/cmd/git/pack.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2021-05-31 18:02:23 -0700
committerOri Bernstein <ori@eigenstate.org>2021-05-31 18:02:23 -0700
commit1160919f8197c8b1ad45f0c5bcf5cef7051202d9 (patch)
treeecd6f75b3122dd2dbf7f07ab7933a393847e6e48 /sys/src/cmd/git/pack.c
parentc29748226982e52d19dfd206a680b97ed35c44f6 (diff)
git/send: pick minimal delta set correctly (thanks igor)
We weren't giving all objects to the twixt() function, and it was making bad life choices -- gambling, smoking, drinking, and packing in too much data. With more information, it doesn't do the last.
Diffstat (limited to 'sys/src/cmd/git/pack.c')
-rw-r--r--sys/src/cmd/git/pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/git/pack.c b/sys/src/cmd/git/pack.c
index 847d931fe..893e4cd85 100644
--- a/sys/src/cmd/git/pack.c
+++ b/sys/src/cmd/git/pack.c
@@ -1326,7 +1326,7 @@ loadtree(Metavec *v, Objset *has, Hash tree, char *dpath, vlong mtime)
if(t->type != GTree){
fprint(2, "load: %H: not tree\n", t->hash);
unref(t);
- return -1;
+ return 0;
}
addmeta(v, has, t, dpath, mtime);
for(i = 0; i < t->tree->nent; i++){
@@ -1363,7 +1363,7 @@ loadcommit(Metavec *v, Objset *has, Hash h)
if(c->type != GCommit){
fprint(2, "load: %H: not commit\n", c->hash);
unref(c);
- return -1;
+ return 0;
}
addmeta(v, has, c, "", c->commit->ctime);
r = loadtree(v, has, c->commit->tree, "", c->commit->ctime);