From 05ac6b34e2c2adda5cb85dd0bdacb47fe5db953e Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 4 Mar 2009 03:32:29 -0500 Subject: [PATCH] improve missing repository error message Certain remote commands, when asked to do something in a particular directory that was not actually a git repository, would say "unable to chdir or not a git archive". The "chdir" bit is an unnecessary detail, and the term "git archive" is much less common these days than "git repository". So let's switch them all to: fatal: '%s' does not appear to be a git repository Signed-off-by: Jeff King Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- builtin-receive-pack.c | 2 +- builtin-upload-archive.c | 2 +- daemon.c | 2 +- upload-pack.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin-receive-pack.c b/builtin-receive-pack.c index 849f1fe6f..a970b3950 100644 --- a/builtin-receive-pack.c +++ b/builtin-receive-pack.c @@ -675,7 +675,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) setup_path(); if (!enter_repo(dir, 0)) - die("'%s': unable to chdir or not a git archive", dir); + die("'%s' does not appear to be a git repository", dir); if (is_repository_shallow()) die("attempt to push into a shallow repository"); diff --git a/builtin-upload-archive.c b/builtin-upload-archive.c index a9b02fa32..0206b416c 100644 --- a/builtin-upload-archive.c +++ b/builtin-upload-archive.c @@ -35,7 +35,7 @@ static int run_upload_archive(int argc, const char **argv, const char *prefix) strcpy(buf, argv[1]); /* enter-repo smudges its argument */ if (!enter_repo(buf, 0)) - die("not a git archive"); + die("'%s' does not appear to be a git repository", buf); /* put received options in sent_argv[] */ sent_argc = 1; diff --git a/daemon.c b/daemon.c index d93cf960f..13401f1ba 100644 --- a/daemon.c +++ b/daemon.c @@ -229,7 +229,7 @@ static char *path_ok(char *directory) } if (!path) { - logerror("'%s': unable to chdir or not a git archive", dir); + logerror("'%s' does not appear to be a git repository", dir); return NULL; } diff --git a/upload-pack.c b/upload-pack.c index 19c24db64..e15ebdc28 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -645,7 +645,7 @@ int main(int argc, char **argv) dir = argv[i]; if (!enter_repo(dir, strict)) - die("'%s': unable to chdir or not a git archive", dir); + die("'%s' does not appear to be a git repository", dir); if (is_repository_shallow()) die("attempt to fetch/clone from a shallow repository"); if (getenv("GIT_DEBUG_SEND_PACK")) -- 2.26.2