diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-03-17 18:58:41 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-03-17 18:58:41 -0700 |
| commit | 9d5b05c6d56a0fb12d43d50d7853178feaf59daa (patch) | |
| tree | 9b8179288ca004c2a5bf7d8bc74d1ed8ce8f13fe /builtin-push.c | |
| parent | 6e5660a7ab20275d80262d0a21bc6c52eead9cd7 (diff) | |
| parent | 9326d49412c8c154b43cb7eba2a8692e9703b0f4 (diff) | |
| download | git-9d5b05c6d56a0fb12d43d50d7853178feaf59daa.tar.gz | |
Merge branch 'db/maint-missing-origin'
* db/maint-missing-origin:
Remove total confusion from git-fetch and git-push
Give error when no remote is configured
Diffstat (limited to 'builtin-push.c')
| -rw-r--r-- | builtin-push.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin-push.c b/builtin-push.c index 122fdcfbdc..ca36fb1e58 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -53,8 +53,11 @@ static int do_push(const char *repo, int flags) int i, errs; struct remote *remote = remote_get(repo); - if (!remote) - die("bad repository '%s'", repo); + if (!remote) { + if (repo) + die("bad repository '%s'", repo); + die("No destination configured to push to."); + } if (remote->mirror) flags |= (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE); |
