ref: 764f431df487635942ac49888d71fc3a59e8104c
parent: 79db1946bb5be5948746ac90802b789d67ddfc4e
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Oct 17 20:12:41 EDT 2019
Ancestor only makes sense for non-nil objects.
--- a/ref.c
+++ b/ref.c
@@ -138,6 +138,8 @@
if(a == b)
return a;
+ if(a == nil || b == nil)
+ return nil;
r = nil;
memset(ht, 0, sizeof(ht));
q1 = nil;
--- a/send.c
+++ b/send.c
@@ -356,7 +356,7 @@
* If we're rolling back with a force push, the other side already
* has our changes. There's no need to send a pack if that's the case.
*/
- if(ancestor(b, a) != b)
+ if(a == nil || b == nil || ancestor(b, a) != b)
send = 1;
}
flushpkt(fd);