Commit 786c647015038a2740bbf2a78c4dc400cb2c2355

Nelson Elhage 2018-06-25T02:05:21

git_refspec_transform: Handle NULL dst

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/refspec.c b/src/refspec.c
index 8061788..82c4770 100644
--- a/src/refspec.c
+++ b/src/refspec.c
@@ -252,7 +252,7 @@ int git_refspec_transform(git_buf *out, const git_refspec *spec, const char *nam
 	}
 
 	if (!spec->pattern)
-		return git_buf_puts(out, spec->dst);
+		return git_buf_puts(out, spec->dst ? spec->dst : "");
 
 	return refspec_transform(out, spec->src, spec->dst, name);
 }