Skip to content

Commit d8f67d2

Browse files
Clemens Buchachergitster
authored andcommitted
remote-helpers: return successfully if everything up-to-date
Signed-off-by: Clemens Buchacher <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ae4efe1 commit d8f67d2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

t/t5540-http-push.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ test_expect_success 'push to remote repository with packed refs' '
5858
test $HEAD = $(git rev-parse --verify HEAD))
5959
'
6060

61-
test_expect_failure 'push already up-to-date' '
61+
test_expect_success 'push already up-to-date' '
6262
git push
6363
'
6464

transport-helper.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ static int push_refs(struct transport *transport,
263263
strbuf_addstr(&buf, ref->name);
264264
strbuf_addch(&buf, '\n');
265265
}
266+
if (buf.len == 0)
267+
return 0;
266268

267269
transport->verbose = flags & TRANSPORT_PUSH_VERBOSE ? 1 : 0;
268270
standard_options(transport);

0 commit comments

Comments
 (0)