Thread (10 messages) flat view 10 messages, 5 authors, 2016-06-15
STALE3714d

[PATCH] Fix a crash in ls-remote when refspec expands into nothing

From: Alex Riesen <hidden>
Date: 2016-06-15 22:43:40
Subsystem: the rest · Maintainer: Linus Torvalds

Originally-by: Väinö Järvelä [off-list ref]
Signed-off-by: Alex Riesen <redacted>
---
 remote.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Shawn O. Pearce, Fri, Oct 12, 2007 06:07:45 +0200:
I think the above patch is the only thing to do here.  Perhaps Alex
can write up a formal patch and send it to back to the list and CC
Lars Hjemli [off-list ref] so he can put it into the patch queue.
here you go
diff --git a/remote.c b/remote.c
index e7d735b..a25f66d 100644
--- a/remote.c
+++ b/remote.c
@@ -882,7 +882,8 @@ int get_fetch_map(struct ref *remote_refs,
 			    rm->peer_ref->name);
 	}
 
-	tail_link_ref(ref_map, tail);
+	if (ref_map)
+		tail_link_ref(ref_map, tail);
 
 	return 0;
 }
-- 
1.5.3.4.232.ga843
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help