From 4d901d1e4165085cda5b574b44e1cc51be50abf8 Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Mon, 17 Apr 2023 21:11:47 +0000 Subject: git/send: correctly delete branches with no local mirror --- sys/src/cmd/git/ref.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/src/cmd/git/ref.c') 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; -- cgit v1.2.3