Skip to content

Commit f61c2c9

Browse files
author
Junio C Hamano
committed
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. c401cb4 Signed-off-by: Junio C Hamano <[email protected]>
1 parent a87cd02 commit f61c2c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

refs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ static int do_for_each_ref(const char *base, int (*fn)(const char *path, const u
152152
continue;
153153
}
154154
if (read_ref(git_path("%s", path), sha1) < 0) {
155-
fprintf(stderr, "%s points nowhere!", path);
155+
error("%s points nowhere!", path);
156156
continue;
157157
}
158158
if (!has_sha1_file(sha1)) {
159-
fprintf(stderr, "%s does not point to a valid "
160-
"commit object!", path);
159+
error("%s does not point to a valid "
160+
"commit object!", path);
161161
continue;
162162
}
163163
retval = fn(path, sha1);

0 commit comments

Comments
 (0)