Merge branch 'maint-1.6.1' into maint
[gitweb.git] / builtin-push.c
index 122fdcfbdc13a11388a091e5ec33d077648fab0a..ca36fb1e5834fc581bc7bf8ed54184bbecdc2389 100644 (file)
@@ -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);