diff options
-rw-r--r-- | quilt.changes | 7 | ||||
-rw-r--r-- | quilt/files.in | 26 |
2 files changed, 20 insertions, 13 deletions
diff --git a/quilt.changes b/quilt.changes index a2877fc..351f81a 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Sep 21 21:33:39 CEST 2005 - khali@linux-fr.org + +- quilt/files.in: Compute file status only when needed (that is, + when -v is used and -l isn't). This divides the execution time + by 5 in all other cases. + +------------------------------------------------------------------- Wed Sep 21 21:13:19 CEST 2005 - khali@linux-fr.org - test/subdir.test: Test quilt files -v. diff --git a/quilt/files.in b/quilt/files.in index 5030cb7..63f80b6 100644 --- a/quilt/files.in +++ b/quilt/files.in @@ -145,19 +145,6 @@ list_files_in_patch() # Note: If opt_labels is set, then use_status is not set. for file in $(files_in_patch_ordered $patch) do - status=" " - if [ -s $(backup_file_name $patch $file) ] - then - if ! [ -s $file ] - then - status="-" - fi - else - if [ -s $file ] - then - status="+" - fi - fi if [ -n "$opt_labels" ] then if [ -n "$opt_verbose" ] @@ -171,6 +158,19 @@ list_files_in_patch() then echo "$file" else + status=" " + if [ -s $(backup_file_name $patch $file) ] + then + if ! [ -s $file ] + then + status="-" + fi + else + if [ -s $file ] + then + status="+" + fi + fi echo "$status $file" fi done |