Fossil SCM
Document actual behavior of ls command. I'm questioning whether it's worth maintaining backward compatibility with this highly non-orthogonal collection of options whose behaviors all affect each other with varying degrees of nuance.
Commit
0a4310b34bb907fa261b974634ba50843624bb2a
Parent
427c34feeada882…
1 file changed
+25
-11
+25
-11
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -353,25 +353,39 @@ | ||
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | /* |
| 356 | 356 | ** COMMAND: ls |
| 357 | 357 | ** |
| 358 | -** Usage: %fossil ls ?OPTIONS? ?FILENAMES? | |
| 359 | -** | |
| 360 | -** Show the names of all files in the current checkout. The -v provides | |
| 361 | -** extra information about each file. If FILENAMES are included, only | |
| 362 | -** the files listed (or their children if they are directories) are shown. | |
| 363 | -** | |
| 364 | -** If -r is given a specific check-in is listed. In this case -R can be | |
| 365 | -** given to query another repository. | |
| 358 | +** Usage: %fossil ls ?OPTIONS? ?PATHS ...? | |
| 359 | +** | |
| 360 | +** List all files in the current checkout. If PATHS is included, only the | |
| 361 | +** named files (or their children if directories) are shown. | |
| 362 | +** | |
| 363 | +** The ls command is essentially two related commands in one, depending on | |
| 364 | +** whether or not the -r option is given. -r selects a specific check-in | |
| 365 | +** version to list, in which case -R can be used to select the repository. | |
| 366 | +** The fine behavior of the --age, -v, and -t options is altered by the -r | |
| 367 | +** option as well, as explained below. | |
| 368 | +** | |
| 369 | +** The --age option displays file commit times. Unless -r is given, the | |
| 370 | +** --age option changes -t's effect from sorting by modification time to | |
| 371 | +** sorting by commit time. | |
| 372 | +** | |
| 373 | +** The -v option provides extra information about each file. Without -r, | |
| 374 | +** -v displays the change status, in the manner of the changes command. | |
| 375 | +** With -r, -v shows the commit time and size of the checked-in files. | |
| 376 | +** | |
| 377 | +** The -t option changes the sort order. Without -t, files are sorted by | |
| 378 | +** path and name (case insensitive sort if -r). If neither --age nor -r | |
| 379 | +** are used, -t sorts by modification time, otherwise by commit time. | |
| 366 | 380 | ** |
| 367 | 381 | ** Options: |
| 368 | -** --age Show when each file was committed | |
| 382 | +** --age Show when each file was committed. | |
| 369 | 383 | ** -v|--verbose Provide extra information about each file. |
| 370 | 384 | ** -t Sort output in time order. |
| 371 | -** -r VERSION The specific check-in to list | |
| 372 | -** -R|--repository FILE Extract info from repository FILE | |
| 385 | +** -r VERSION The specific check-in to list. | |
| 386 | +** -R|--repository FILE Extract info from repository FILE. | |
| 373 | 387 | ** |
| 374 | 388 | ** See also: changes, extras, status |
| 375 | 389 | */ |
| 376 | 390 | void ls_cmd(void){ |
| 377 | 391 | int vid; |
| 378 | 392 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -353,25 +353,39 @@ | |
| 353 | } |
| 354 | |
| 355 | /* |
| 356 | ** COMMAND: ls |
| 357 | ** |
| 358 | ** Usage: %fossil ls ?OPTIONS? ?FILENAMES? |
| 359 | ** |
| 360 | ** Show the names of all files in the current checkout. The -v provides |
| 361 | ** extra information about each file. If FILENAMES are included, only |
| 362 | ** the files listed (or their children if they are directories) are shown. |
| 363 | ** |
| 364 | ** If -r is given a specific check-in is listed. In this case -R can be |
| 365 | ** given to query another repository. |
| 366 | ** |
| 367 | ** Options: |
| 368 | ** --age Show when each file was committed |
| 369 | ** -v|--verbose Provide extra information about each file. |
| 370 | ** -t Sort output in time order. |
| 371 | ** -r VERSION The specific check-in to list |
| 372 | ** -R|--repository FILE Extract info from repository FILE |
| 373 | ** |
| 374 | ** See also: changes, extras, status |
| 375 | */ |
| 376 | void ls_cmd(void){ |
| 377 | int vid; |
| 378 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -353,25 +353,39 @@ | |
| 353 | } |
| 354 | |
| 355 | /* |
| 356 | ** COMMAND: ls |
| 357 | ** |
| 358 | ** Usage: %fossil ls ?OPTIONS? ?PATHS ...? |
| 359 | ** |
| 360 | ** List all files in the current checkout. If PATHS is included, only the |
| 361 | ** named files (or their children if directories) are shown. |
| 362 | ** |
| 363 | ** The ls command is essentially two related commands in one, depending on |
| 364 | ** whether or not the -r option is given. -r selects a specific check-in |
| 365 | ** version to list, in which case -R can be used to select the repository. |
| 366 | ** The fine behavior of the --age, -v, and -t options is altered by the -r |
| 367 | ** option as well, as explained below. |
| 368 | ** |
| 369 | ** The --age option displays file commit times. Unless -r is given, the |
| 370 | ** --age option changes -t's effect from sorting by modification time to |
| 371 | ** sorting by commit time. |
| 372 | ** |
| 373 | ** The -v option provides extra information about each file. Without -r, |
| 374 | ** -v displays the change status, in the manner of the changes command. |
| 375 | ** With -r, -v shows the commit time and size of the checked-in files. |
| 376 | ** |
| 377 | ** The -t option changes the sort order. Without -t, files are sorted by |
| 378 | ** path and name (case insensitive sort if -r). If neither --age nor -r |
| 379 | ** are used, -t sorts by modification time, otherwise by commit time. |
| 380 | ** |
| 381 | ** Options: |
| 382 | ** --age Show when each file was committed. |
| 383 | ** -v|--verbose Provide extra information about each file. |
| 384 | ** -t Sort output in time order. |
| 385 | ** -r VERSION The specific check-in to list. |
| 386 | ** -R|--repository FILE Extract info from repository FILE. |
| 387 | ** |
| 388 | ** See also: changes, extras, status |
| 389 | */ |
| 390 | void ls_cmd(void){ |
| 391 | int vid; |
| 392 |