summaryrefslogtreecommitdiff
path: root/rerere.c
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2018-07-14 21:44:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-16 21:03:24 (GMT)
commite69db0b323ff35ffb15e96b0ab492c0f6268f43c (patch)
tree66622402174a45bd1aa2a11c0d123577e85f07ba /rerere.c
parente3331758f12da22f4103eec7efe1b5304a9be5e9 (diff)
downloadgit-e69db0b323ff35ffb15e96b0ab492c0f6268f43c.zip
git-e69db0b323ff35ffb15e96b0ab492c0f6268f43c.tar.gz
git-e69db0b323ff35ffb15e96b0ab492c0f6268f43c.tar.bz2
rerere: unify error messages when read_cache fails
We have multiple different variants of the error message we show to the user if 'read_cache' fails. The "Could not read index" variant we are using in 'rerere.c' is currently not used anywhere in translated form. As a subsequent commit will mark all output that comes from 'rerere.c' for translation, make the life of the translators a little bit easier by using a string that is used elsewhere, and marked for translation there, and thus most likely already translated. "index file corrupt" seems to be the most common error message we show when 'read_cache' fails, so use that here as well. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rerere.c')
-rw-r--r--rerere.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rerere.c b/rerere.c
index e0862e2..473d32a 100644
--- a/rerere.c
+++ b/rerere.c
@@ -568,7 +568,7 @@ static int find_conflict(struct string_list *conflict)
{
int i;
if (read_cache() < 0)
- return error("Could not read index");
+ return error("index file corrupt");
for (i = 0; i < active_nr;) {
int conflict_type;
@@ -601,7 +601,7 @@ int rerere_remaining(struct string_list *merge_rr)
if (setup_rerere(merge_rr, RERERE_READONLY))
return 0;
if (read_cache() < 0)
- return error("Could not read index");
+ return error("index file corrupt");
for (i = 0; i < active_nr;) {
int conflict_type;
@@ -1103,7 +1103,7 @@ int rerere_forget(struct pathspec *pathspec)
struct string_list merge_rr = STRING_LIST_INIT_DUP;
if (read_cache() < 0)
- return error("Could not read index");
+ return error("index file corrupt");
fd = setup_rerere(&merge_rr, RERERE_NOAUTOUPDATE);
if (fd < 0)