summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2009-10-30 17:47:31 -0700
committerJunio C Hamano <gitster@pobox.com>2009-10-30 19:20:54 -0700
commitd8f67d205eb98ea6dab915c29122158054218128 (patch)
treefe1e38bc1e603ebd0636f6e9d3368c07052f7c9b
parentae4efe195752c27cb25fca9451852c0f4eebdb28 (diff)
downloadgit-d8f67d205eb98ea6dab915c29122158054218128.tar.gz
remote-helpers: return successfully if everything up-to-date
Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t5540-http-push.sh2
-rw-r--r--transport-helper.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index 09edd2387b..2ece6612e1 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 16c6641f03..5078c7100f 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);