summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f06f08b)
raw | patch | inline | side by side (parent: f06f08b)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sun, 10 Apr 2011 19:34:02 +0000 (19:34 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 12 Apr 2011 17:46:29 +0000 (10:46 -0700) |
Mark the init-db messages that were added in v1.7.5-rc1~16^2 (init,
clone: support --separate-git-dir for .git file) by Nguyễn Thái Ngọc
Duy for translation.
This requires splitting up the tests that the patch added so that
certain parts of them can be skipped unless the C_LOCALE_OUTPUT
prerequisite is satisfied.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
clone: support --separate-git-dir for .git file) by Nguyễn Thái Ngọc
Duy for translation.
This requires splitting up the tests that the patch added so that
certain parts of them can be skipped unless the C_LOCALE_OUTPUT
prerequisite is satisfied.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/init-db.c | patch | blob | history | |
t/t5601-clone.sh | patch | blob | history |
diff --git a/builtin/init-db.c b/builtin/init-db.c
index b7370d9bb8f235f1cf39b1ffa768498ca1e88654..ba13a54793d46de2410db14e6f387674e3b27c82 100644 (file)
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
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
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);
}
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 5a068b21e4aeac79863df657d6388ec4c2732d55..a50e36e262e2dc3c967e3098501eb2a74acc78a6 100755 (executable)
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
test_expect_success 'clone separate gitdir' '
rm -rf dst &&
git clone --separate-git-dir realgitdir src dst &&
- echo "gitdir: `pwd`/realgitdir" >expected &&
- test_cmp expected dst/.git &&
test -d realgitdir/refs
'
+test_expect_success C_LOCALE_OUTPUT 'clone separate gitdir: output' '
+ echo "gitdir: `pwd`/realgitdir" >expected &&
+ test_cmp expected dst/.git
+'
+
test_expect_success 'clone separate gitdir where target already exists' '
rm -rf dst &&
test_must_fail git clone --separate-git-dir realgitdir src dst