Merge branch 'jk/http-push-symref-fix'
* jk/http-push-symref-fix:
http-push: trim trailing newline from remote symref
diff --git a/http-push.c b/http-push.c
index 952f8ed..0beb7ab 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1577,6 +1577,9 @@
if (buffer.len == 0)
return;
+ /* Cut off trailing newline. */
+ strbuf_rtrim(&buffer);
+
/* If it's a symref, set the refname; otherwise try for a sha1 */
if (skip_prefix(buffer.buf, "ref: ", &name)) {
*symref = xmemdupz(name, buffer.len - (name - buffer.buf));