summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-08-02 20:05:43 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-08-02 20:05:43 +0000
commit9cc7575bb8b3bc86d8d4f0ec79a965359daabaa8 (patch)
tree577e2452f390b268fbcc4eae8da200366083899d /usr.bin/cvs
parent0316aef1450e3a92f8cec1f5444bbd8953766433 (diff)
handle -l global option; ok jfb@ joris@.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/hist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/cvs/hist.c b/usr.bin/cvs/hist.c
index a752f39aca7..6f28ff9e4d4 100644
--- a/usr.bin/cvs/hist.c
+++ b/usr.bin/cvs/hist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hist.c,v 1.8 2005/07/29 17:04:42 xsa Exp $ */
+/* $OpenBSD: hist.c,v 1.9 2005/08/02 20:05:42 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -79,6 +79,7 @@ cvs_hist_open(const char *path)
if (histp->chf_fd == -1) {
cvs_log(LP_ERRNO,
"failed to open CVS history file `%s'", path);
+ cvs_nolog = 1;
free(histp->chf_buf);
free(histp);
return (NULL);
@@ -138,6 +139,9 @@ cvs_hist_append(CVSHIST *histp, struct cvs_hent *hentp)
{
char hbuf[128];
+ if (cvs_nolog == 1)
+ return (0);
+
if (cvs_hist_fmt(hentp, hbuf, sizeof(hbuf)) < 0) {
cvs_log(LP_ERR, "failed to append CVS history entry");
return (-1);