From: Junio C Hamano Date: Mon, 14 Jan 2013 15:33:48 +0000 (-0800) Subject: Merge branch 'jl/interrupt-clone-remove-separate-git-dir' into maint X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=32e820bdc5ca66d53605bfdcb0751b21a2372de2;p=git.git Merge branch 'jl/interrupt-clone-remove-separate-git-dir' into maint When "git clone --separate-git-dir=$over_there" is interrupted, it failed to remove the real location of the $GIT_DIR it created. This was most visible when interrupting a submodule update. * jl/interrupt-clone-remove-separate-git-dir: clone: support atomic operation with --separate-git-dir --- 32e820bdc5ca66d53605bfdcb0751b21a2372de2 diff --cc builtin/clone.c index ec2f75b4f,b054313ab..8d23a62e8 --- a/builtin/clone.c +++ b/builtin/clone.c @@@ -768,20 -468,18 +768,22 @@@ 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_init(git_dir, real_git_dir, 0); - if (real_git_dir) + if (real_git_dir) { git_dir = real_git_dir; + junk_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); + write_config(&option_config); /* * At this point, the config exists, so we do not need the