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>
Clemens Buchacher committed
Oct 30, 2009 at 17:47 UTC
d8f67d205eb98ea6dab915c29122158054218128
2 files changed
+3
-1
t/t5540-http-push.sh
+1
-1
@@ -58,7 +58,7 @@ test_expect_success 'push to remote repository with packed refs' '
58
test $HEAD = $(git rev-parse --verify HEAD))
59
'
60
61
-test_expect_failure 'push already up-to-date' '
61
+test_expect_success 'push already up-to-date' '
62
git push
63
'
64
transport-helper.c
+2
@@ -263,6 +263,8 @@ static int push_refs(struct transport *transport,
263
strbuf_addstr(&buf, ref->name);
264
strbuf_addch(&buf, '\n');
265
}
266
+ if (buf.len == 0)
267
+ return 0;
268
269
transport->verbose = flags & TRANSPORT_PUSH_VERBOSE ? 1 : 0;
270
standard_options(transport);