Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Wed, 25 May 2011 22:25:44 +0000 (15:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 May 2011 22:25:44 +0000 (15:25 -0700)
* maint:
init/clone: remove short option -L and document --separate-git-dir

1  2 
builtin/clone.c
builtin/init-db.c
t/t0001-init.sh
diff --combined builtin/clone.c
index 49c838fd3ff24ecc7821fbcf8f312d76967c168d,8560cf8572a1e4786ae4593c21c0e9d3a5d9d6e8..f579794d9a93a0e55289921f20b8f68b85211ca1
@@@ -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 ba13a54793d46de2410db14e6f387674e3b27c82,7d8ff096e9f5c19bfd050cedbed062c909101d19..025aa47c804e4400cfa16ae8acd8dc2a5175e7c0
@@@ -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 8106af8fba918b8de82857d40a7f693224c84e81,37c22516ffa731f4ed3d783c72daa7fe915c8705..ad664105646d4579a4e31ea5d230268acc33c0f5
@@@ -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 &&
                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 &&