Originally, "series" with no options was implemented by calling
cat_series directly, while options required calling cat_patches which
was very slow on large series. Having a fast path made complete
sense back then.
However, since commit 117e66f40d01 ("Series command: add missing
paths to patches if $QUILT_PATCHES_PREFIX is set"), the fast path is
also calling cat_patches, so it is no longer fast. Therefore it no
longer makes sense to have distinct code paths and we can simplify the
code with no performance penalty.
Signed-off-by: Jean Delvare <[email protected]>
---
quilt/series.in | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
--- a/quilt/series.in
+++ b/quilt/series.in
@@ -87,23 +87,18 @@ fi
setup_pager
-if [ -n "$opt_verbose$opt_color" ]
-then
- [ -n "$opt_color" ] && setup_colors
+[ -n "$opt_color" ] && setup_colors
- top=$(top_patch)
- 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
- cat_patches "" "" $(cat_series)
+top=$(top_patch)
+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")
### Local Variables:
### mode: shell-script
### End:
--
Jean Delvare
SUSE L3 Support
_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev