From: Tay Ray Chuan Date: Fri, 8 Jan 2010 02:12:45 +0000 (+0800) Subject: transport-helper.c::push_refs(): emit "no refs" error message X-Git-Tag: v1.7.0-rc0~74^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c1ceea1d273925fe6ecb0824e7ea08eb6e6e2635;p=git.git transport-helper.c::push_refs(): emit "no refs" error message 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 Signed-off-by: Junio C Hamano --- diff --git a/transport-helper.c b/transport-helper.c index 71a1e50ee..8c0b575f3 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -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)