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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alex Riesen
Date: Friday, October 12, 2007 - 1:40 pm

Originally-by: Väinö Järvelä <v@pp.inet.fi>
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 remote.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Shawn O. Pearce, Fri, Oct 12, 2007 06:07:45 +0200:

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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fixed crash in fetching remote tags when there is ..., Väinö Järvelä, (Tue Oct 9, 1:51 am)
[PATCH] Fix a crash in ls-remote when refspec expands into ..., Alex Riesen, (Fri Oct 12, 1:40 pm)