Skip to content

Commit

Permalink
refs.c::do_for_each_ref(): Finish error message lines with "\n"
Browse files Browse the repository at this point in the history
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 <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Mar 9, 2006
1 parent a87cd02 commit f61c2c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f61c2c9

Please sign in to comment.