@matheusbsbs / matheus-bagliano / commits / f61c2c970c
Fork 0

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. c401cb48e77459a4ccad76888ad31bef252facc5 Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Mar 9, 2006 at 12:59 UTC f61c2c970c08653ade940fce678c7591abcfcde4
1 file changed +3 -3
refs.c
+3 -3
@@ -152,12 +152,12 @@ static int do_for_each_ref(const char *base, int (*fn)(const char *path, const u
152 continue;
153 }
154 if (read_ref(git_path("%s", path), sha1) < 0) {
155 - fprintf(stderr, "%s points nowhere!", path);
155 + error("%s points nowhere!", path);
156 continue;
157 }
158 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);
161 continue;
162 }
163 retval = fn(path, sha1);