summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f30f71c)
raw | patch | inline | side by side (parent: f30f71c)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Tue, 22 Feb 2011 23:42:29 +0000 (23:42 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Mar 2011 07:52:57 +0000 (23:52 -0800) |
Translate the "Your local changes [...]" message without using the
`me' variable, instead split up the two messages so translators can
translate the whole messages as-is.
Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
`me' variable, instead split up the two messages so translators can
translate the whole messages as-is.
Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/revert.c | patch | blob | history | |
t/t3501-revert-cherry-pick.sh | patch | blob | history |
diff --git a/builtin/revert.c b/builtin/revert.c
index 1ca08da5eccc4aeeb3b92834bc58ae61b41d837f..02c23c957702206dcf9a503b7eea77406683e0b5 100644 (file)
--- a/builtin/revert.c
+++ b/builtin/revert.c
if (read_cache_unmerged()) {
die_resolve_conflict(me);
} else {
- if (advice_commit_before_merge)
- die("Your local changes would be overwritten by %s.\n"
- "Please, commit your changes or stash them to proceed.", me);
- else
- die("Your local changes would be overwritten by %s.\n", me);
+ if (advice_commit_before_merge) {
+ if (action == REVERT)
+ die(_("Your local changes would be overwritten by revert.\n"
+ "Please, commit your changes or stash them to proceed."));
+ else
+ die(_("Your local changes would be overwritten by cherry-pick.\n"
+ "Please, commit your changes or stash them to proceed."));
+ } else {
+ if (action == REVERT)
+ die(_("Your local changes would be overwritten by revert.\n"));
+ else
+ die(_("Your local changes would be overwritten by cherry-pick.\n"));
+ }
}
}
index 043954422c82d9afbb318bcb7d1aa5685a391c85..753a6c972cda61d2da3d2ecf7bd9c231004d6ad0 100755 (executable)
)
'
-test_expect_success 'revert forbidden on dirty working tree' '
+test_expect_success C_LOCALE_OUTPUT 'revert forbidden on dirty working tree' '
echo content >extra_file &&
git add extra_file &&