Skip to content

Commit

Permalink
transport-helper.c::push_refs(): emit "no refs" error message
Browse files Browse the repository at this point in the history
Emit an error message when remote_refs is not set.

This behaviour is consistent with that of builtin-send-pack.c and
http-push.c.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Tay Ray Chuan authored and Junio C Hamano committed Jan 10, 2010
1 parent 08d63a4 commit c1ceea1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion transport-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,11 @@ static int push_refs(struct transport *transport,
struct child_process *helper;
struct ref *ref;

if (!remote_refs)
if (!remote_refs) {
fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
"Perhaps you should specify a branch such as 'master'.\n");
return 0;
}

helper = get_helper(transport);
if (!data->push)
Expand Down

0 comments on commit c1ceea1

Please sign in to comment.