Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/http-push-symref-fix'
author
Junio C Hamano
<gitster@pobox.com>
Wed, 21 Jan 2015 01:31:50 +0000
(17:31 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 21 Jan 2015 01:31:50 +0000
(17:31 -0800)
* jk/http-push-symref-fix:
http-push: trim trailing newline from remote symref
http-push.c
patch
|
blob
|
history
raw
(from parent 1:
17ad371
)
diff --git
a/http-push.c
b/http-push.c
index 952f8ede49daf4e275c42cc0682bb01c4c58446a..0beb7ab67ffc93a6c8fe8517d711945e2c033b7d 100644
(file)
--- a/
http-push.c
+++ b/
http-push.c
@@
-1577,6
+1577,9
@@
static void fetch_symref(const char *path, char **symref, unsigned char *sha1)
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));