[PATCH v2 3/3] transport-helper.c::push_refs(): emit "no refs" error message
- From
Tay Ray Chuan <rctay89@gmail.com>
- Date
- Dec 8, 2009, 14:37 UTC
- Message-ID
- <20091208223733.5528e781.rctay89@gmail.com>
- In-Reply-To
- <20091208223413.98e99d3e.rctay89@gmail.com>
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> --- transport-helper.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/transport-helper.c b/transport-helper.c index 6b1f778..96fc48b 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) -- 1.6.4.4