[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH] series: Remove the "fast" path
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH] series: Remove the "fast" path |
Date: |
Fri, 21 Jun 2024 16:16:14 +0200 |
User-agent: |
Evolution 3.42.4 |
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 <jdelvare@suse.de>
---
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Quilt-dev] [PATCH] series: Remove the "fast" path,
Jean Delvare <=