refs: use warning() instead of fprintf(stderr, "warning: ")
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5620e77e30
commit
edbc25c5b3
8
refs.c
8
refs.c
@ -996,7 +996,7 @@ int delete_ref(const char *refname, const unsigned char *sha1, int delopt)
|
|||||||
|
|
||||||
err = unlink(git_path("logs/%s", lock->ref_name));
|
err = unlink(git_path("logs/%s", lock->ref_name));
|
||||||
if (err && errno != ENOENT)
|
if (err && errno != ENOENT)
|
||||||
fprintf(stderr, "warning: unlink(%s) failed: %s",
|
warning("unlink(%s) failed: %s",
|
||||||
git_path("logs/%s", lock->ref_name), strerror(errno));
|
git_path("logs/%s", lock->ref_name), strerror(errno));
|
||||||
invalidate_cached_refs();
|
invalidate_cached_refs();
|
||||||
unlock_ref(lock);
|
unlock_ref(lock);
|
||||||
@ -1438,8 +1438,7 @@ int read_ref_at(const char *ref, unsigned long at_time, int cnt, unsigned char *
|
|||||||
if (get_sha1_hex(rec + 41, sha1))
|
if (get_sha1_hex(rec + 41, sha1))
|
||||||
die("Log %s is corrupt.", logfile);
|
die("Log %s is corrupt.", logfile);
|
||||||
if (hashcmp(logged_sha1, sha1)) {
|
if (hashcmp(logged_sha1, sha1)) {
|
||||||
fprintf(stderr,
|
warning("Log %s has gap after %s.",
|
||||||
"warning: Log %s has gap after %s.\n",
|
|
||||||
logfile, show_date(date, tz, DATE_RFC2822));
|
logfile, show_date(date, tz, DATE_RFC2822));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1451,8 +1450,7 @@ int read_ref_at(const char *ref, unsigned long at_time, int cnt, unsigned char *
|
|||||||
if (get_sha1_hex(rec + 41, logged_sha1))
|
if (get_sha1_hex(rec + 41, logged_sha1))
|
||||||
die("Log %s is corrupt.", logfile);
|
die("Log %s is corrupt.", logfile);
|
||||||
if (hashcmp(logged_sha1, sha1)) {
|
if (hashcmp(logged_sha1, sha1)) {
|
||||||
fprintf(stderr,
|
warning("Log %s unexpectedly ended on %s.",
|
||||||
"warning: Log %s unexpectedly ended on %s.\n",
|
|
||||||
logfile, show_date(date, tz, DATE_RFC2822));
|
logfile, show_date(date, tz, DATE_RFC2822));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user