changeset 12365:8fecaa78ac4b

(vc-backend-admin, vc-backend-checkin): Assume that comments are empty if they contain only white space.
author Richard M. Stallman <rms@gnu.org>
date Fri, 23 Jun 1995 15:50:17 +0000
parents a910242e72c0
children 8415d665d19f
files lisp/vc.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc.el	Thu Jun 22 23:01:20 1995 +0000
+++ b/lisp/vc.el	Fri Jun 23 15:50:17 1995 +0000
@@ -1545,7 +1545,7 @@
 	  ((eq backend 'CVS)
 	   (vc-do-command 0 "cvs" file 'WORKFILE ;; CVS
 			  "add"
-			  (and comment (not (string= comment ""))
+			  (and comment (string-match "[^\t\n ]" comment)
 			       (concat "-m" comment)))
 	   )))
   (message "Registering %s...done" file)
@@ -1688,8 +1688,9 @@
   ;; accordingly.
   (message "Checking in %s..." file)
   ;; "This log message intentionally left almost blank".
-  (and (or (not comment) (string= comment ""))
-       (setq comment "*** empty log message ***"))
+  ;; RCS 5.7 gripes about white-space-only comments too.
+  (or (and comment (string-match "[^\t\n ]" comment))
+      (setq comment "*** empty log message ***"))
   (save-excursion
     ;; Change buffers to get local value of vc-checkin-switches.
     (set-buffer (or (get-file-buffer file) (current-buffer)))