From: Junio C Hamano Date: Sat, 2 Apr 2011 00:57:37 +0000 (-0700) Subject: Merge branch 'nd/init-gitdir' X-Git-Tag: v1.7.5-rc1~16 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c4b2ce69534e1d51f71142ba0e463ed89605ccd1;p=git.git Merge branch 'nd/init-gitdir' * nd/init-gitdir: init, clone: support --separate-git-dir for .git file git-init.txt: move description section up Conflicts: builtin/clone.c --- c4b2ce69534e1d51f71142ba0e463ed89605ccd1 diff --cc builtin/clone.c index 0b5601a9b,097beca3a..4144bcf5c --- a/builtin/clone.c +++ b/builtin/clone.c @@@ -466,15 -468,15 +469,18 @@@ int cmd_clone(int argc, const char **ar setenv(CONFIG_ENVIRONMENT, mkpath("%s/config", git_dir), 1); if (safe_create_leading_directories_const(git_dir) < 0) - die("could not create leading directories of '%s'", git_dir); + die(_("could not create leading directories of '%s'"), git_dir); - set_git_dir(real_path(git_dir)); + + set_git_dir_init(git_dir, real_git_dir, 0); + if (real_git_dir) + git_dir = real_git_dir; - if (0 <= option_verbosity) - printf("Cloning into %s%s...\n", - option_bare ? "bare repository " : "", dir); + if (0 <= option_verbosity) { + if (option_bare) + printf(_("Cloning into bare repository %s...\n"), dir); + else + printf(_("Cloning into %s...\n"), dir); + } init_db(option_template, INIT_DB_QUIET); /* diff --cc builtin/init-db.c index 6621e5671,887939923..b7370d9bb --- a/builtin/init-db.c +++ b/builtin/init-db.c @@@ -352,17 -409,10 +409,16 @@@ int init_db(const char *template_dir, u } if (!(flags & INIT_DB_QUIET)) { - const char *git_dir = get_git_dir(); int len = strlen(git_dir); - printf("%s%s Git repository in %s%s\n", - reinit ? "Reinitialized existing" : "Initialized empty", - shared_repository ? " shared" : "", + + /* + * TRANSLATORS: The first '%s' is either "Reinitialized + * existing" or "Initialized empty", the second " shared" or + * "", and the last '%s%s' is the verbatim directory name. + */ + printf(_("%s%s Git repository in %s%s\n"), + reinit ? _("Reinitialized existing") : _("Initialized empty"), + shared_repository ? _(" shared") : "", git_dir, len && git_dir[len-1] != '/' ? "/" : ""); }