summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2009-03-24 01:09:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-03-24 04:02:28 (GMT)
commitedbc25c5b377d6fe768cefcc8614cd254a9fc4ff (patch)
tree10d0b3b63e19f4c92b3fee7a54683246bfba6672
parent5620e77e30b72e674a6bec55fd4bfdac2d5a75fd (diff)
downloadgit-edbc25c5b377d6fe768cefcc8614cd254a9fc4ff.zip
git-edbc25c5b377d6fe768cefcc8614cd254a9fc4ff.tar.gz
git-edbc25c5b377d6fe768cefcc8614cd254a9fc4ff.tar.bz2
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>
-rw-r--r--refs.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/refs.c b/refs.c
index 8d3c502..aeef257 100644
--- a/refs.c
+++ b/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));
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));
invalidate_cached_refs();
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))
die("Log %s is corrupt.", logfile);
if (hashcmp(logged_sha1, sha1)) {
- fprintf(stderr,
- "warning: Log %s has gap after %s.\n",
+ warning("Log %s has gap after %s.",
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))
die("Log %s is corrupt.", logfile);
if (hashcmp(logged_sha1, sha1)) {
- fprintf(stderr,
- "warning: Log %s unexpectedly ended on %s.\n",
+ warning("Log %s unexpectedly ended on %s.",
logfile, show_date(date, tz, DATE_RFC2822));
}
}