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>
This commit is contained in:
Clemens Buchacher 2009-10-30 17:47:31 -07:00 committed by Junio C Hamano
parent ae4efe1957
commit d8f67d205e
2 changed files with 3 additions and 1 deletions

View file

@ -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
'

View file

@ -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);