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 <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tay Ray Chuan committed
Jan 8, 2010 at 10:12 UTC
c1ceea1d273925fe6ecb0824e7ea08eb6e6e2635
1 file changed
+4
-1
transport-helper.c
+4
-1
@@ -321,8 +321,11 @@ static int push_refs(struct transport *transport,
321
struct child_process *helper;
322
struct ref *ref;
323
324
- if (!remote_refs)
324
+ if (!remote_refs) {
325
+ fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
326
+ "Perhaps you should specify a branch such as 'master'.\n");
327
return 0;
328
+ }
329
330
helper = get_helper(transport);
331
if (!data->push)