From: Junio C Hamano Date: Mon, 24 Sep 2018 17:30:52 +0000 (-0700) Subject: Merge branch 'ms/remote-error-message-update' X-Git-Tag: v2.20.0-rc0~207 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/00d5f665a031a0e74d6e03f54d5aba547a5b0c14?ds=inline;hp=-c Merge branch 'ms/remote-error-message-update' Update error messages given by "git remote" and make them consistent. * ms/remote-error-message-update: builtin/remote: quote remote name on error to display empty name --- 00d5f665a031a0e74d6e03f54d5aba547a5b0c14 diff --combined builtin/remote.c index 40c6f8a1bd,5fd1012faa..f7edf7f2cb --- a/builtin/remote.c +++ b/builtin/remote.c @@@ -10,7 -10,6 +10,7 @@@ #include "refspec.h" #include "object-store.h" #include "argv-array.h" +#include "commit-reach.h" static const char * const builtin_remote_usage[] = { N_("git remote [-v | --verbose]"), @@@ -413,7 -412,7 +413,7 @@@ static int get_push_ref_states(const st if (is_null_oid(&ref->new_oid)) { info->status = PUSH_STATUS_DELETE; - } else if (!oidcmp(&ref->old_oid, &ref->new_oid)) + } else if (oideq(&ref->old_oid, &ref->new_oid)) info->status = PUSH_STATUS_UPTODATE; else if (is_null_oid(&ref->old_oid)) info->status = PUSH_STATUS_CREATE; @@@ -626,7 -625,7 +626,7 @@@ static int mv(int argc, const char **ar oldremote = remote_get(rename.old_name); if (!remote_is_configured(oldremote, 1)) - die(_("No such remote: %s"), rename.old_name); + die(_("No such remote: '%s'"), rename.old_name); if (!strcmp(rename.old_name, rename.new_name) && oldremote->origin != REMOTE_CONFIG) return migrate_file(oldremote); @@@ -762,7 -761,7 +762,7 @@@ static int rm(int argc, const char **ar remote = remote_get(argv[1]); if (!remote_is_configured(remote, 1)) - die(_("No such remote: %s"), argv[1]); + die(_("No such remote: '%s'"), argv[1]); known_remotes.to_delete = remote; for_each_remote(add_known_remote, &known_remotes); @@@ -861,7 -860,7 +861,7 @@@ static int get_remote_ref_states(const states->remote = remote_get(name); if (!states->remote) - return error(_("No such remote: %s"), name); + return error(_("No such remote: '%s'"), name); read_branches();