diff options
author | Jean Delvare <jdelvare@suse.de> | 2020-05-13 16:04:44 +0200 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2020-05-13 16:04:44 +0200 |
commit | 4040eb7dce59a708038d0b0c4171e8d41c4a0288 (patch) | |
tree | 1576ae19adceec11cb39543d4dc119e8e9773e07 | |
parent | 48fe0e50dbbbd8035ef1373ed9486c58517e9432 (diff) | |
download | quilt-4040eb7dce59a708038d0b0c4171e8d41c4a0288.tar.gz |
series: Minor optimizations
* If there is no top patch, then there can't be patches before the
top patch.
* Use applied_before as it is faster than patches_before.
The performance gain was measured to be between 1% and 3% on
half-applied large patch series.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
-rw-r--r-- | quilt/series.in | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/quilt/series.in b/quilt/series.in index d0db12f..a0768e3 100644 --- a/quilt/series.in +++ b/quilt/series.in @@ -95,10 +95,13 @@ then [ -n "$opt_color" ] && setup_colors top=$(top_patch) - cat_patches "$color_series_app" \ - "${opt_verbose:++ }" $(patches_before $top) - [ -n "$top" ] && cat_patches "$color_series_top" \ - "${opt_verbose:+= }" $top + if [ -n "$top" ] + then + cat_patches "$color_series_app" \ + "${opt_verbose:++ }" $(applied_before $top) + cat_patches "$color_series_top" \ + "${opt_verbose:+= }" $top + fi cat_patches "$color_series_una" \ "${opt_verbose:+ }" $(patches_after $top) else |