send-email: 'References:' should only reference what is sent
[gitweb.git] / builtin-push.c
index bbf019850e5b93a2e36584fc00573dd180a19be0..2eabcd3bdfb3f5d5705125a8f74d21d4ab1deafc 100644 (file)
@@ -118,8 +118,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);