Diff
Not logged in

Differences From:

File src/update.c part of check-in [b3ec774ab7] - Fail with an error if a file is outside the checkout tree. by drh on 2008-02-08 16:24:24. [view]

To:

File src/update.c part of check-in [5cc845cfeb] - Rename the 'clearsign' setting to 'pgp-command'. Remove the 'safemerge' setting - safemerge is on by default and cannot be disabled. by drh on 2008-02-08 21:42:46. [view]

@@ -37,9 +37,9 @@
 
 /*
 ** COMMAND: update
 **
-** Usage: %fossil update ?VERSION? ?--force? ?--latest?
+** Usage: %fossil update ?VERSION? ?--latest?
 **
 ** The optional argument is a version that should become the current
 ** version.  If the argument is omitted, then use the leaf of the
 ** tree that begins with the current version, if there is only a
@@ -47,12 +47,8 @@
 ** if the --latest flag is present.
 **
 ** This command is different from the "checkout" in that edits are
 ** not overwritten.  Edits are merged into the new version.
-**
-** If there are uncommitted edits and the safemerge option is
-** enabled then no update will occur unless you provide the
-** --force flag.
 */
 void update_cmd(void){
   int vid;              /* Current version */
   int tid=0;            /* Target version - version we are changing to */
@@ -72,11 +68,15 @@
   }
   if( db_exists("SELECT 1 FROM vmerge") ){
     fossil_fatal("cannot update an uncommitted merge");
   }
-  if( !forceFlag && db_get_int("safemerge", 0) && unsaved_changes() ){
-    fossil_fatal("there are uncommitted changes and safemerge is enabled");
-  }
+#if 0
+  /* Always do the update.  If it does not work out, the user can back out
+  ** the changes using "undo" */
+  if( !forceFlag && unsaved_changes() ){
+    fossil_fatal("uncommitted changes; use -f or --force to override");
+  }
+#endif
 
   if( g.argc==3 ){
     tid = name_to_rid(g.argv[2]);
     if( tid==0 ){