diff options
author | 2007-10-03 13:12:06 +0000 | |
---|---|---|
committer | 2007-10-03 13:12:06 +0000 | |
commit | b6bee91328e5e1f80190352e0d599732c7b0802d (patch) | |
tree | b08a816d71bf238a5b49fdb57bcbf8885216295b /usr.bin/cvs/commit.c | |
parent | MALLOC+bzero -> malloc+M_ZERO. (diff) | |
download | wireguard-openbsd-b6bee91328e5e1f80190352e0d599732c7b0802d.tar.xz wireguard-openbsd-b6bee91328e5e1f80190352e0d599732c7b0802d.zip |
reset the default branch early on so rcs_head_get() does not screw us up
and returns a possibly wrong revision as 'current revision'.
noticed by tobias@ his regress testing
Diffstat (limited to 'usr.bin/cvs/commit.c')
-rw-r--r-- | usr.bin/cvs/commit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index 8ebb4e8f1c2..1a90b308ea3 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.113 2007/09/24 13:56:09 joris Exp $ */ +/* $OpenBSD: commit.c,v 1.114 2007/10/03 13:12:06 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -289,6 +289,11 @@ cvs_commit_local(struct cvs_file *cf) crev = NULL; rrev = NULL; + if (cf->file_rcs->rf_branch != NULL) { + rcsnum_free(cf->file_rcs->rf_branch); + cf->file_rcs->rf_branch = NULL; + } + if (cf->file_status == FILE_MODIFIED || cf->file_status == FILE_REMOVED || (cf->file_status == FILE_ADDED && cf->file_rcs != NULL && cf->file_rcs->rf_dead == 1)) { @@ -418,11 +423,6 @@ cvs_commit_local(struct cvs_file *cf) fatal("cvs_commit_local: failed to set state"); } - if (cf->file_rcs->rf_branch != NULL) { - rcsnum_free(cf->file_rcs->rf_branch); - cf->file_rcs->rf_branch = NULL; - } - if (cf->file_status == FILE_ADDED && cf->file_ent->ce_opts != NULL) { int kflag; |