提交 f61c2c97 编写于 作者: J Junio C Hamano

refs.c::do_for_each_ref(): Finish error message lines with "\n"

We used fprintf() to show an error message without terminating
it with LF; use error() for that.

cf. c401cb48Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 a87cd02c
......@@ -152,12 +152,12 @@ static int do_for_each_ref(const char *base, int (*fn)(const char *path, const u
continue;
}
if (read_ref(git_path("%s", path), sha1) < 0) {
fprintf(stderr, "%s points nowhere!", path);
error("%s points nowhere!", path);
continue;
}
if (!has_sha1_file(sha1)) {
fprintf(stderr, "%s does not point to a valid "
"commit object!", path);
error("%s does not point to a valid "
"commit object!", path);
continue;
}
retval = fn(path, sha1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册