warning("deleting branch '%s' that has been merged to\n"
" '%s', but not yet been merged to HEAD.",
warning(_("deleting branch '%s' that has been merged to\n"
" '%s', but not yet merged to HEAD."),
name, reference_name);
else
warning("not deleting branch '%s' that is not yet merged to\n"
" '%s', even though it is merged to HEAD.",
warning(_("not deleting branch '%s' that is not yet merged to\n"
" '%s', even though it is merged to HEAD."),
name, reference_name);
}
return merged;
@ -157,7 +157,8 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
@@ -157,7 +157,8 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
switch (kinds) {
case REF_REMOTE_BRANCH:
fmt = "refs/remotes/%s";
remote = "remote ";
/* TRANSLATORS: This is "remote " in "remote branch '%s' not found" */
remote = _("remote ");
force = 1;
break;
case REF_LOCAL_BRANCH:
@ -165,19 +166,19 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
@@ -165,19 +166,19 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
remote = "";
break;
default:
die("cannot use -a with -d");
die(_("cannot use -a with -d"));
}
if (!force) {
head_rev = lookup_commit_reference(head_sha1);
if (!head_rev)
die("Couldn't look up commit object for HEAD");
die(_("Couldn't look up commit object for HEAD"));
}
for (i = 0; i < argc; i++, strbuf_release(&bname)) {
strbuf_branchname(&bname, argv[i]);
if (kinds == REF_LOCAL_BRANCH && !strcmp(head, bname.buf)) {
error("Cannot delete the branch '%s' "
"which you are currently on.", bname.buf);
error(_("Cannot delete the branch '%s' "
"which you are currently on."), bname.buf);
ret = 1;
continue;
}
@ -186,7 +187,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
@@ -186,7 +187,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
name = xstrdup(mkpath(fmt, bname.buf));
if (!resolve_ref(name, sha1, 1, NULL)) {
error("%sbranch '%s' not found.",
error(_("%sbranch '%s' not found."),
remote, bname.buf);
ret = 1;
continue;
@ -194,31 +195,31 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
@@ -194,31 +195,31 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
rev = lookup_commit_reference(sha1);
if (!rev) {
error("Couldn't look up commit object for '%s'", name);
error(_("Couldn't look up commit object for '%s'"), name);
ret = 1;
continue;
}
if (!force && !branch_merged(kinds, bname.buf, rev, head_rev)) {
if (head_commit && is_descendant_of(head_commit, ref_list->with_commit)) {
struct ref_item item;
item.name = xstrdup("(no branch)");
item.name = xstrdup(_("(no branch)"));
item.len = strlen(item.name);
item.kind = REF_LOCAL_BRANCH;
item.dest = NULL;
@ -541,7 +542,7 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru
@@ -541,7 +542,7 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru
die("git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout '%s' which can not be resolved as commit?", argv[0]);
die(_("git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout '%s' which can not be resolved as commit?"), argv[0]);
} else {
die("git checkout: updating paths is incompatible with switching branches.");
die(_("git checkout: updating paths is incompatible with switching branches."));
die("You didn't specify any refspecs to push, and "
"push.default is \"nothing\".");
die(_("You didn't specify any refspecs to push, and "
"push.default is \"nothing\"."));
break;
}
}
@ -127,11 +127,11 @@ static int push_with_options(struct transport *transport, int flags)
@@ -127,11 +127,11 @@ static int push_with_options(struct transport *transport, int flags)
error("failed to push some refs to '%s'", transport->url);
error(_("failed to push some refs to '%s'"), transport->url);
err |= transport_disconnect(transport);
@ -139,9 +139,9 @@ static int push_with_options(struct transport *transport, int flags)
@@ -139,9 +139,9 @@ static int push_with_options(struct transport *transport, int flags)
return 0;
if (nonfastforward && advice_push_nonfastforward) {
fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
fprintf(stderr, _("To prevent you from losing history, non-fast-forward updates were rejected\n"
"Merge the remote changes (e.g. 'git pull') before pushing again. See the\n"
"'Note about fast-forwards' section of 'git push --help' for details.\n");
"'Note about fast-forwards' section of 'git push --help' for details.\n"));
}
return 1;
@ -156,15 +156,15 @@ static int do_push(const char *repo, int flags)
@@ -156,15 +156,15 @@ static int do_push(const char *repo, int flags)
if (!remote) {
if (repo)
die("bad repository '%s'", repo);
die("No configured push destination.\n"
die(_("bad repository '%s'"), repo);
die(_("No configured push destination.\n"
"Either specify the URL from the command-line or configure a remote repository using\n"
"\n"
" git remote add <name> <url>\n"
"\n"
"and then push using the remote name\n"
"\n"
" git push <name>\n");
" git push <name>\n"));
}
if (remote->mirror)
@ -172,19 +172,19 @@ static int do_push(const char *repo, int flags)
@@ -172,19 +172,19 @@ static int do_push(const char *repo, int flags)
if ((flags & TRANSPORT_PUSH_ALL) && refspec) {
if (!strcmp(*refspec, "refs/tags/*"))
return error("--all and --tags are incompatible");
return error("--all can't be combined with refspecs");
return error(_("--all and --tags are incompatible"));
return error(_("--all can't be combined with refspecs"));
}
if ((flags & TRANSPORT_PUSH_MIRROR) && refspec) {
if (!strcmp(*refspec, "refs/tags/*"))
return error("--mirror and --tags are incompatible");
return error("--mirror can't be combined with refspecs");
return error(_("--mirror and --tags are incompatible"));
return error(_("--mirror can't be combined with refspecs"));
}
if ((flags & (TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) ==
(TRANSPORT_PUSH_ALL|TRANSPORT_PUSH_MIRROR)) {
return error("--all and --mirror are incompatible");
return error(_("--all and --mirror are incompatible"));
@ -92,20 +92,20 @@ static int reset_index_file(const unsigned char *sha1, int reset_type, int quiet
@@ -92,20 +92,20 @@ static int reset_index_file(const unsigned char *sha1, int reset_type, int quiet
if (reset_type == KEEP) {
unsigned char head_sha1[20];
if (get_sha1("HEAD", head_sha1))
return error("You do not have a valid HEAD.");
return error(_("You do not have a valid HEAD."));
if (!fill_tree_descriptor(desc, head_sha1))
return error("Failed to find tree of HEAD.");
return error(_("Failed to find tree of HEAD."));
nr++;
opts.fn = twoway_merge;
}
if (!fill_tree_descriptor(desc + nr - 1, sha1))
return error("Failed to find tree of %s.", sha1_to_hex(sha1));
return error(_("Failed to find tree of %s."), sha1_to_hex(sha1));
if (unpack_trees(nr, desc, &opts))
return -1;
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(lock))
return error("Could not write new index file.");
return error(_("Could not write new index file."));
test_expect_success 'favour same basenames over different ones' '
test_expect_success C_LOCALE_OUTPUT 'favour same basenames over different ones' '
cp path1 another-path &&
git add another-path &&
git commit -m 1 &&
@ -73,7 +73,7 @@ test_expect_success 'favour same basenames over different ones' '
@@ -73,7 +73,7 @@ test_expect_success 'favour same basenames over different ones' '
git mv another-path subdir/path1 &&
git status | grep "renamed: .*path1 -> subdir/path1"'
test_expect_success 'favour same basenames even with minor differences' '
test_expect_success C_LOCALE_OUTPUT 'favour same basenames even with minor differences' '
git show HEAD:path1 | sed "s/15/16/" > subdir/path1 &&
git status | grep "renamed: .*path1 -> subdir/path1"'
@ -614,7 +614,7 @@ echo "fatal: --name-only does not make sense" > expect.name-only
@@ -614,7 +614,7 @@ echo "fatal: --name-only does not make sense" > expect.name-only
echo "fatal: --name-status does not make sense" > expect.name-status
echo "fatal: --check does not make sense" > expect.check
test_expect_success 'options no longer allowed for format-patch' '
test_expect_success C_LOCALE_OUTPUT 'options no longer allowed for format-patch' '
@ -128,11 +128,14 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
@@ -128,11 +128,14 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
# push master too; this ensures there is at least one '"'push'"' command to
# the remote helper and triggers interaction with the helper.
@ -233,7 +233,7 @@ test_expect_success '"reset --merge HEAD^" is ok with pending merge' '
@@ -233,7 +233,7 @@ test_expect_success '"reset --merge HEAD^" is ok with pending merge' '
@ -259,7 +259,7 @@ test_expect_success '"reset --merge HEAD" is ok with pending merge' '
@@ -259,7 +259,7 @@ test_expect_success '"reset --merge HEAD" is ok with pending merge' '
test_expect_success '"reset --keep HEAD" fails with pending merge' '
test_expect_success C_LOCALE_OUTPUT '"reset --keep HEAD" fails with pending merge' '
git reset --hard third &&
test_must_fail git merge branch1 &&
test_must_fail git reset --keep HEAD 2>err.log &&
@ -280,7 +280,7 @@ test_expect_success '--merge is ok with added/deleted merge' '
@@ -280,7 +280,7 @@ test_expect_success '--merge is ok with added/deleted merge' '
git diff --exit-code --cached
'
test_expect_success '--keep fails with added/deleted merge' '
test_expect_success C_LOCALE_OUTPUT '--keep fails with added/deleted merge' '
test_expect_success 'checkout to detach HEAD (with advice declined)' '
test_expect_success C_LOCALE_OUTPUT 'checkout to detach HEAD (with advice declined)' '
git config advice.detachedHead false &&
git checkout -f renamer && git clean -f &&
@ -242,7 +242,7 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '
@@ -242,7 +242,7 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '
fi
'
test_expect_success 'checkout to detach HEAD' '
test_expect_success C_LOCALE_OUTPUT 'checkout to detach HEAD' '
git config advice.detachedHead true &&
git checkout -f renamer && git clean -f &&
git checkout renamer^ 2>messages &&
@ -260,7 +260,7 @@ test_expect_success 'checkout to detach HEAD' '
@@ -260,7 +260,7 @@ test_expect_success 'checkout to detach HEAD' '
fi
'
test_expect_success 'checkout to detach HEAD with branchname^' '
test_expect_success C_LOCALE_OUTPUT 'checkout to detach HEAD with branchname^' '
git checkout -f master && git clean -f &&
git checkout renamer^ &&
@ -276,7 +276,7 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
@@ -276,7 +276,7 @@ test_expect_success 'checkout to detach HEAD with branchname^' '
fi
'
test_expect_success 'checkout to detach HEAD with :/message' '
test_expect_success C_LOCALE_OUTPUT 'checkout to detach HEAD with :/message' '
git checkout -f master && git clean -f &&
git checkout ":/Initial" &&
@ -292,7 +292,7 @@ test_expect_success 'checkout to detach HEAD with :/message' '
@@ -292,7 +292,7 @@ test_expect_success 'checkout to detach HEAD with :/message' '
fi
'
test_expect_success 'checkout to detach HEAD with HEAD^0' '
test_expect_success C_LOCALE_OUTPUT 'checkout to detach HEAD with HEAD^0' '
@ -72,7 +72,7 @@ test_expect_success 'adding comments to a template should not commit' '
@@ -72,7 +72,7 @@ test_expect_success 'adding comments to a template should not commit' '
)
'
test_expect_success 'adding real content to a template should commit' '
test_expect_success C_LOCALE_OUTPUT 'adding real content to a template should commit' '
@ -80,7 +80,7 @@ test_expect_success 'adding real content to a template should commit' '
@@ -80,7 +80,7 @@ test_expect_success 'adding real content to a template should commit' '
commit_msg_is "template linecommit message"
'
test_expect_success '-t option should be short for --template' '
test_expect_success C_LOCALE_OUTPUT '-t option should be short for --template' '
echo "short template" > "$TEMPLATE" &&
echo "new content" >> foo &&
git add foo &&
@ -91,7 +91,7 @@ test_expect_success '-t option should be short for --template' '
@@ -91,7 +91,7 @@ test_expect_success '-t option should be short for --template' '
commit_msg_is "short templatecommit message"
'
test_expect_success 'config-specified template should commit' '
test_expect_success C_LOCALE_OUTPUT 'config-specified template should commit' '
echo "new template" > "$TEMPLATE" &&
git config commit.template "$TEMPLATE" &&
echo "more content" >> foo &&
@ -290,7 +290,7 @@ test_expect_success 'commit --squash works with -c for same commit' '
@@ -290,7 +290,7 @@ test_expect_success 'commit --squash works with -c for same commit' '
commit_msg_is "squash! edited commit"
'
test_expect_success 'commit --squash works with editor' '
test_expect_success C_LOCALE_OUTPUT 'commit --squash works with editor' '
@ -95,7 +95,7 @@ test_expect_success 'status with added and untracked file in submodule (porcelai
@@ -95,7 +95,7 @@ test_expect_success 'status with added and untracked file in submodule (porcelai
EOF
'
test_expect_success 'status with modified file in modified submodule' '
test_expect_success C_LOCALE_OUTPUT 'status with modified file in modified submodule' '