Skip to content

Commit

Permalink
remote-helpers: return successfully if everything up-to-date
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Buchacher authored and Junio C Hamano committed Oct 31, 2009
1 parent ae4efe1 commit d8f67d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion t/t5540-http-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'

Expand Down
2 changes: 2 additions & 0 deletions transport-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d8f67d2

Please sign in to comment.