From: Clemens Buchacher Date: Sat, 31 Oct 2009 00:47:31 +0000 (-0700) Subject: remote-helpers: return successfully if everything up-to-date X-Git-Tag: v1.6.6-rc0~22^2~25 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d8f67d205eb98ea6dab915c29122158054218128;p=git.git remote-helpers: return successfully if everything up-to-date Signed-off-by: Clemens Buchacher Signed-off-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh index 09edd2387..2ece6612e 100755 --- a/t/t5540-http-push.sh +++ b/t/t5540-http-push.sh @@ -58,7 +58,7 @@ test_expect_success 'push to remote repository with packed refs' ' test $HEAD = $(git rev-parse --verify HEAD)) ' -test_expect_failure 'push already up-to-date' ' +test_expect_success 'push already up-to-date' ' git push ' diff --git a/transport-helper.c b/transport-helper.c index 16c6641f0..5078c7100 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -263,6 +263,8 @@ static int push_refs(struct transport *transport, strbuf_addstr(&buf, ref->name); strbuf_addch(&buf, '\n'); } + if (buf.len == 0) + return 0; transport->verbose = flags & TRANSPORT_PUSH_VERBOSE ? 1 : 0; standard_options(transport);