commit ad7de8d907a8f1a02d6449c9795f79a11d74d1b5 from: Stefan Sperling date: Mon Apr 30 12:33:28 2018 UTC tog(1): improve "unknown command" error message commit - c2301be8a8ce61e6c8f12911c32a70d636b2e5c9 commit + ad7de8d907a8f1a02d6449c9795f79a11d74d1b5 blob - 2b977a10f0a83d20daf46dce7156c9be121e59c2 blob + c31cd3fda721b5e2d4da9cc906d189a82ed3cce9 --- tog/tog.c +++ tog/tog.c @@ -519,11 +519,12 @@ main(int argc, char *argv[]) if (error == NULL) got_repo_close(repo); } else - error = got_error(GOT_ERR_NOT_GIT_REPO); + error = got_error_from_errno(); if (error) { - free(repo_path); - fprintf(stderr, "%s: unknown command '%s'\n", + fprintf(stderr, "%s: '%s' is neither a known " + "command nor a path to a repository\n", getprogname(), argv[0]); + free(repo_path); return 1; } cmd = &tog_commands[0];