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 <peff@peff.net> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Mar 4, 2009 at 03:32 UTC
05ac6b34e2c2adda5cb85dd0bdacb47fe5db953e
4 files changed
+4
-4
builtin-receive-pack.c
+1
-1
@@ -675,7 +675,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
675
setup_path();
676
677
if (!enter_repo(dir, 0))
678
- die("'%s': unable to chdir or not a git archive", dir);
678
+ die("'%s' does not appear to be a git repository", dir);
679
680
if (is_repository_shallow())
681
die("attempt to push into a shallow repository");
builtin-upload-archive.c
+1
-1
@@ -35,7 +35,7 @@ static int run_upload_archive(int argc, const char **argv, const char *prefix)
35
strcpy(buf, argv[1]); /* enter-repo smudges its argument */
36
37
if (!enter_repo(buf, 0))
38
- die("not a git archive");
38
+ die("'%s' does not appear to be a git repository", buf);
39
40
/* put received options in sent_argv[] */
41
sent_argc = 1;
daemon.c
+1
-1
@@ -229,7 +229,7 @@ static char *path_ok(char *directory)
229
}
230
231
if (!path) {
232
- logerror("'%s': unable to chdir or not a git archive", dir);
232
+ logerror("'%s' does not appear to be a git repository", dir);
233
return NULL;
234
}
235
upload-pack.c
+1
-1
@@ -645,7 +645,7 @@ int main(int argc, char **argv)
645
dir = argv[i];
646
647
if (!enter_repo(dir, strict))
648
- die("'%s': unable to chdir or not a git archive", dir);
648
+ die("'%s' does not appear to be a git repository", dir);
649
if (is_repository_shallow())
650
die("attempt to fetch/clone from a shallow repository");
651
if (getenv("GIT_DEBUG_SEND_PACK"))