Differences From:
File
src/checkin.c
part of check-in
[70656d00f6]
- Minor clean up to the "ci" command.
by
drh on
2009-12-11 16:29:00.
Also file
src/checkin.c
part of check-in
[1c2d878d12]
- Merge with trunk
by
btheado on
2009-12-13 01:16:13.
[view]
To:
File
src/checkin.c
part of check-in
[9c06ea3120]
- Change the "ls" command so that it only shows the filenames by default.
To see the extra information about the status of each file, add the -l
option. Ex: "fossil ls -l"
by
drh on
2009-12-17 14:27:06.
[view]
@@ -122,16 +122,19 @@
/*
** COMMAND: ls
**
-** Usage: %fossil ls
-**
-** Show the names of all files in the current checkout
+** Usage: %fossil ls [-l]
+**
+** Show the names of all files in the current checkout. The -l provides
+** extra information about each file.
*/
void ls_cmd(void){
int vid;
Stmt q;
-
+ int isBrief;
+
+ isBrief = find_option("l","l", 0)==0;
db_must_be_within_tree();
vid = db_lget_int("checkout", 0);
vfile_check_signature(vid);
db_prepare(&q,
@@ -145,9 +148,11 @@
int isNew = db_column_int(&q,2)==0;
int chnged = db_column_int(&q,3);
int renamed = db_column_int(&q,4);
char *zFullName = mprintf("%s/%s", g.zLocalRoot, zPathname);
- if( isNew ){
+ if( isBrief ){
+ printf("%s\n", zPathname);
+ }else if( isNew ){
printf("ADDED %s\n", zPathname);
}else if( access(zFullName, 0) ){
printf("MISSING %s\n", zPathname);
}else if( isDeleted ){