shithub: git9

Download patch

ref: 0538cff331dc302e20babe67a758166dcf19b807
parent: b896fc76bb3655028b97a1be943d316a98258698
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jan 30 20:09:18 EST 2021

git/send: correct assertion

We were assuming we would be pushing branches that
existed locally; that's not true.

--- a/send.c
+++ b/send.c
@@ -59,7 +59,7 @@
 			sysfatal("smprint: %r");
 		if((idx = findref(ref, nu, r)) == -1)
 			idx = nu++;
-		assert(idx < nbranch);
+		assert(idx < nremoved + nbranch);
 		memcpy(&tail[idx], &Zhash, sizeof(Hash));
 		free(r);
 	}