summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/add.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-06-14 03:19:16 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-06-14 03:19:16 +0000
commite0521522cf3a43f99da13b4e1a59bd82bb470015 (patch)
tree05bc8014a274d830c1ce4f23347e9fd2fd708b44 /usr.bin/cvs/add.c
parentdc650b3cd564bb3f7b03f782108ce9e181b89ed4 (diff)
don't always re-open the same CVS/Entries file, instead keep the
last opened CVS/Entries around to operate on and close it whenever we switch directory. gives us a small performance boost, obviously. while doing this, switch the way we write revisions to disk by using fwrite(3) so stuff can get written to disk in chunks instead of writing everything line by line, another win. with help from otto@ ok tobias@
Diffstat (limited to 'usr.bin/cvs/add.c')
-rw-r--r--usr.bin/cvs/add.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c
index 1023209ce32..b0c35f877d6 100644
--- a/usr.bin/cvs/add.c
+++ b/usr.bin/cvs/add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: add.c,v 1.102 2008/06/14 02:34:27 tobias Exp $ */
+/* $OpenBSD: add.c,v 1.103 2008/06/14 03:19:15 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -137,7 +137,6 @@ cvs_add_entry(struct cvs_file *cf)
entlist = cvs_ent_open(cf->file_wd);
cvs_ent_add(entlist, entry);
- cvs_ent_close(entlist, ENT_SYNC);
xfree(entry);
} else {
@@ -282,7 +281,6 @@ add_directory(struct cvs_file *cf)
entlist = cvs_ent_open(cf->file_wd);
cvs_ent_add(entlist, p);
- cvs_ent_close(entlist, ENT_SYNC);
xfree(p);
}
}
@@ -495,7 +493,6 @@ add_entry(struct cvs_file *cf)
} else {
entlist = cvs_ent_open(cf->file_wd);
cvs_ent_add(entlist, entry);
- cvs_ent_close(entlist, ENT_SYNC);
}
xfree(entry);
}