summaryrefslogtreecommitdiffstats
path: root/convert.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-07-21 09:49:19 +0200
committerJunio C Hamano <gitster@pobox.com>2018-07-23 11:19:09 -0700
commit1a07e59c3e269418f3f5d186d166bf5ab5db6667 (patch)
treeaf7144a561d023b0d095c6c5463d00fe05248be6 /convert.c
parente3331758f12da22f4103eec7efe1b5304a9be5e9 (diff)
downloadgit-1a07e59c3e269418f3f5d186d166bf5ab5db6667.tar.gz
git-1a07e59c3e269418f3f5d186d166bf5ab5db6667.tar.xz
Update messages in preparation for i18n
Many messages will be marked for translation in the following commits. This commit updates some of them to be more consistent and reduce diff noise in those commits. Changes are - keep the first letter of die(), error() and warning() in lowercase - no full stop in die(), error() or warning() if it's single sentence messages - indentation - some messages are turned to BUG(), or prefixed with "BUG:" and will not be marked for i18n - some messages are improved to give more information - some messages are broken down by sentence to be i18n friendly (on the same token, combine multiple warning() into one big string) - the trailing \n is converted to printf_ln if possible, or deleted if not redundant - errno_errno() is used instead of explicit strerror() Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'convert.c')
-rw-r--r--convert.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/convert.c b/convert.c
index 64d0d30e0..f47e60022 100644
--- a/convert.c
+++ b/convert.c
@@ -190,7 +190,7 @@ static enum eol output_eol(enum crlf_action crlf_action)
/* fall through */
return text_eol_is_crlf() ? EOL_CRLF : EOL_LF;
}
- warning("Illegal crlf_action %d\n", (int)crlf_action);
+ warning("illegal crlf_action %d", (int)crlf_action);
return core_eol;
}
@@ -203,7 +203,7 @@ static void check_global_conv_flags_eol(const char *path, enum crlf_action crlf_
* CRLFs would not be restored by checkout
*/
if (conv_flags & CONV_EOL_RNDTRP_DIE)
- die(_("CRLF would be replaced by LF in %s."), path);
+ die(_("CRLF would be replaced by LF in %s"), path);
else if (conv_flags & CONV_EOL_RNDTRP_WARN)
warning(_("CRLF will be replaced by LF in %s.\n"
"The file will have its original line"
@@ -493,7 +493,7 @@ static int encode_to_worktree(const char *path, const char *src, size_t src_len,
&dst_len);
if (!dst) {
error("failed to encode '%s' from %s to %s",
- path, default_encoding, enc);
+ path, default_encoding, enc);
return 0;
}