THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

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>
tags/v1.6.3-rc0
Jeff King Junio C Hamano 10 years ago
parent
commit
05ac6b34e2
4 changed files with 4 additions and 4 deletions
  1. +1
    -1
      builtin-receive-pack.c
  2. +1
    -1
      builtin-upload-archive.c
  3. +1
    -1
      daemon.c
  4. +1
    -1
      upload-pack.c

+ 1
- 1
builtin-receive-pack.c View File

@@ -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");


+ 1
- 1
builtin-upload-archive.c View File

@@ -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;


+ 1
- 1
daemon.c View File

@@ -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;
}



+ 1
- 1
upload-pack.c View File

@@ -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"))


Loading…
Cancel
Save