summaryrefslogtreecommitdiff
path: root/sha1-file.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-07-21 07:49:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-23 18:19:09 (GMT)
commit1a07e59c3e269418f3f5d186d166bf5ab5db6667 (patch)
treeaf7144a561d023b0d095c6c5463d00fe05248be6 /sha1-file.c
parente3331758f12da22f4103eec7efe1b5304a9be5e9 (diff)
downloadgit-1a07e59c3e269418f3f5d186d166bf5ab5db6667.zip
git-1a07e59c3e269418f3f5d186d166bf5ab5db6667.tar.gz
git-1a07e59c3e269418f3f5d186d166bf5ab5db6667.tar.bz2
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 'sha1-file.c')
-rw-r--r--sha1-file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sha1-file.c b/sha1-file.c
index de4839e..ed7ac73 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -71,17 +71,17 @@ static void git_hash_sha1_final(unsigned char *hash, git_hash_ctx *ctx)
static void git_hash_unknown_init(git_hash_ctx *ctx)
{
- die("trying to init unknown hash");
+ BUG("trying to init unknown hash");
}
static void git_hash_unknown_update(git_hash_ctx *ctx, const void *data, size_t len)
{
- die("trying to update unknown hash");
+ BUG("trying to update unknown hash");
}
static void git_hash_unknown_final(unsigned char *hash, git_hash_ctx *ctx)
{
- die("trying to finalize unknown hash");
+ BUG("trying to finalize unknown hash");
}
const struct git_hash_algo hash_algos[GIT_HASH_NALGOS] = {
@@ -379,7 +379,7 @@ static int alt_odb_usable(struct raw_object_store *o,
/* Detect cases where alternate disappeared */
if (!is_directory(path->buf)) {
error("object directory %s does not exist; "
- "check .git/objects/info/alternates.",
+ "check .git/objects/info/alternates",
path->buf);
return 0;
}