Diff
Not logged in

Differences From:

File src/checkin.c part of check-in [2bde9f9b3d] - Add "ci" as an alias for "commit". Make provisions for a future "fossil mv" command. by drh on 2008-10-21 06:10:33. [view]

To:

File src/checkin.c part of check-in [89d100b845] - Make the "ls" command report MISSING instead of EDITED for files that do not exist in the tree. Ticket ce458c35ca. by drh on 2008-10-31 14:01:16. [view]

@@ -135,17 +135,21 @@
     const char *zPathname = db_column_text(&q,0);
     int isDeleted = db_column_int(&q, 1);
     int isNew = db_column_int(&q,2)==0;
     int chnged = db_column_int(&q,3);
+    char *zFullName = mprintf("%s/%s", g.zLocalRoot, zPathname);
     if( isNew ){
       printf("ADDED     %s\n", zPathname);
+    }else if( access(zFullName, 0) ){
+      printf("MISSING   %s\n", zPathname);
     }else if( isDeleted ){
       printf("DELETED   %s\n", zPathname);
     }else if( chnged ){
       printf("EDITED    %s\n", zPathname);
     }else{
       printf("UNCHANGED %s\n", zPathname);
     }
+    free(zFullName);
   }
   db_finalize(&q);
 }