Optimize VC-WORKFILE-MODIFIED? to avoid running diff if possible.
authorChris Hanson <org/chris-hanson/cph>
Mon, 27 Mar 2000 18:01:54 +0000 (18:01 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 27 Mar 2000 18:01:54 +0000 (18:01 +0000)
v7/src/edwin/vc.scm

index f4645089603c76762b93336c82a7d6f391b5951c..82dd0f3d453dc253530cefd0a19857004de90d3e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: vc.scm,v 1.42 2000/03/27 17:54:08 cph Exp $
+;;; $Id: vc.scm,v 1.43 2000/03/27 18:01:54 cph Exp $
 ;;;
 ;;; Copyright (c) 1994-2000 Massachusetts Institute of Technology
 ;;;
@@ -1802,12 +1802,11 @@ the value of vc-log-mode-hook."
                       (vc-master-workfile master)
     (lambda (tm tw)
       tm
-      (or (and tw
-              (let ((tokens (find-cvs-entry master)))
-                (and tokens
-                     (string=? (file-time->global-ctime-string tw)
-                               (caddr tokens)))))
-         (vc-backend-diff master #f #f #t)))))
+      (let ((tokens (find-cvs-entry master)))
+       (if (and tw tokens
+                (string=? (file-time->global-ctime-string tw) (caddr tokens)))
+           #f
+           (vc-backend-diff master #f #f #t))))))
 
 (define (vc-save-workfile-buffer workfile)
   (let ((buffer (pathname->buffer workfile)))