From: Junio C Hamano Date: Wed, 25 May 2011 22:25:44 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.7.6-rc0~33 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6741c2e64adabfa0422b6d60db177ca88a5eca35?hp=-c Merge branch 'maint' * maint: init/clone: remove short option -L and document --separate-git-dir --- 6741c2e64adabfa0422b6d60db177ca88a5eca35 diff --combined builtin/clone.c index 49c838fd3f,8560cf8572..f579794d9a --- a/builtin/clone.c +++ b/builtin/clone.c @@@ -81,7 -81,7 +81,7 @@@ static struct option builtin_clone_opti "path to git-upload-pack on the remote"), OPT_STRING(0, "depth", &option_depth, "depth", "create a shallow clone of that depth"), - OPT_STRING('L', "separate-git-dir", &real_git_dir, "gitdir", + OPT_STRING(0, "separate-git-dir", &real_git_dir, "gitdir", "separate git dir from working tree"), OPT_END() @@@ -417,7 -417,7 +417,7 @@@ int cmd_clone(int argc, const char **ar if (path) repo = xstrdup(absolute_path(repo_name)); else if (!strchr(repo_name, ':')) - die("repository '%s' does not exist", repo_name); + die(_("repository '%s' does not exist"), repo_name); else repo = repo_name; is_local = path && !is_bundle; diff --combined builtin/init-db.c index ba13a54793,7d8ff096e9..025aa47c80 --- a/builtin/init-db.c +++ b/builtin/init-db.c @@@ -319,10 -319,10 +319,10 @@@ int set_git_dir_init(const char *git_di struct stat st; if (!exist_ok && !stat(git_dir, &st)) - die("%s already exists", git_dir); + die(_("%s already exists"), git_dir); if (!exist_ok && !stat(real_git_dir, &st)) - die("%s already exists", real_git_dir); + die(_("%s already exists"), real_git_dir); /* * make sure symlinks are resolved because we'll be @@@ -351,15 -351,15 +351,15 @@@ static void separate_git_dir(const cha else if (S_ISDIR(st.st_mode)) src = git_link; else - die("unable to handle file type %d", st.st_mode); + die(_("unable to handle file type %d"), st.st_mode); if (rename(src, git_dir)) - die_errno("unable to move %s to %s", src, git_dir); + die_errno(_("unable to move %s to %s"), src, git_dir); } fp = fopen(git_link, "w"); if (!fp) - die("Could not create git link %s", git_link); + die(_("Could not create git link %s"), git_link); fprintf(fp, "gitdir: %s\n", git_dir); fclose(fp); } @@@ -490,7 -490,7 +490,7 @@@ int cmd_init_db(int argc, const char ** "specify that the git repository is to be shared amongst several users", PARSE_OPT_OPTARG | PARSE_OPT_NONEG, shared_callback, 0}, OPT_BIT('q', "quiet", &flags, "be quiet", INIT_DB_QUIET), - OPT_STRING('L', "separate-git-dir", &real_git_dir, "gitdir", + OPT_STRING(0, "separate-git-dir", &real_git_dir, "gitdir", "separate git dir from working tree"), OPT_END() }; diff --combined t/t0001-init.sh index 8106af8fba,37c22516ff..ad66410564 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@@ -180,7 -180,7 +180,7 @@@ test_expect_success 'GIT_DIR & GIT_WORK fi ' -test_expect_success C_LOCALE_OUTPUT 'reinit' ' +test_expect_success 'reinit' ' ( sane_unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG && @@@ -190,11 -190,11 +190,11 @@@ git init >out1 2>err1 && git init >out2 2>err2 ) && - grep "Initialized empty" again/out1 && - grep "Reinitialized existing" again/out2 && + test_i18ngrep "Initialized empty" again/out1 && + test_i18ngrep "Reinitialized existing" again/out2 && >again/empty && - test_cmp again/empty again/err1 && - test_cmp again/empty again/err2 + test_i18ncmp again/empty again/err1 && + test_i18ncmp again/empty again/err2 ' test_expect_success 'init with --template' ' @@@ -409,7 -409,7 +409,7 @@@ test_expect_success SYMLINKS 're-init t cd newdir && mv .git here && ln -s here .git && - git init -L ../realgitdir + git init --separate-git-dir ../realgitdir ) && echo "gitdir: `pwd`/realgitdir" >expected && test_cmp expected newdir/.git &&