send-email: 'References:' should only reference what is sent
[gitweb.git] / builtin-push.c
index 8f4fa5b09eca25f35a6af0edbce4b0781b5129c2..2eabcd3bdfb3f5d5705125a8f74d21d4ab1deafc 100644 (file)
@@ -73,7 +73,7 @@ static const char *warn_unconfigured_push_msg[] = {
        "",
        "You can specify what action you want to take in this case, and",
        "avoid seeing this message again, by configuring 'push.default' to:",
-       "  'nothing'  : Do not push anythig",
+       "  'nothing'  : Do not push anything",
        "  'matching' : Push all matching branches (default)",
        "  'tracking' : Push the current branch to whatever it is tracking",
        "  'current'  : Push the current branch"
@@ -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);