summaryrefslogtreecommitdiff
path: root/sys/src/cmd/git/ref.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2023-04-17 21:11:47 +0000
committerOri Bernstein <ori@eigenstate.org>2023-04-17 21:11:47 +0000
commit4d901d1e4165085cda5b574b44e1cc51be50abf8 (patch)
treed8a0e4163181158207d0546c69b9bc42a397570d /sys/src/cmd/git/ref.c
parentdd676b5a4fa19fcbe608598e73e3ee6b5bd5ad84 (diff)
git/send: correctly delete branches with no local mirror
Diffstat (limited to 'sys/src/cmd/git/ref.c')
-rw-r--r--sys/src/cmd/git/ref.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/cmd/git/ref.c b/sys/src/cmd/git/ref.c
index 5dadbd27a..fd732c944 100644
--- a/sys/src/cmd/git/ref.c
+++ b/sys/src/cmd/git/ref.c
@@ -125,6 +125,8 @@ paint(Hash *head, int nhead, Hash *tail, int ntail, Object ***res, int *nres, in
nskip = 0;
for(i = 0; i < nhead; i++){
+ if(hasheq(&head[i], &Zhash))
+ continue;
if((o = readobject(head[i])) == nil){
fprint(2, "warning: %H does not point at commit\n", head[i]);
werrstr("read head %H: %r", head[i]);
@@ -140,6 +142,8 @@ paint(Hash *head, int nhead, Hash *tail, int ntail, Object ***res, int *nres, in
unref(o);
}
for(i = 0; i < ntail; i++){
+ if(hasheq(&head[i], &Zhash))
+ continue;
if((o = readobject(tail[i])) == nil){
werrstr("read tail %H: %r", tail[i]);
return -1;