The "new" command supports option -p ab, which will add -p ab to the
new patch's options in the series file. Problem is, this option isn't
actually supported in the series file. Only options which should be
passed to the patch command are supported.

So don't let the user pass option -p ab when creating a patch.

This should prevent some confusion as reported here:
https://savannah.nongnu.org/patch/index.php?10094

Fixes: 66f9da46333e ("new command: Add -p ... option (equivalent to diff -p 
...)")
Signed-off-by: Jean Delvare <jdelv...@suse.de>
---
This was discussed on the list 3 years ago:
https://lists.nongnu.org/archive/html/quilt-dev/2021-08/msg00001.html

No decision was made then, and the reporter never got back to me. I
think that dropping the option makes more sense, because no other
patch formatting option is supported in the series file, and there are
other ways to set the format to "ab" (when refreshing the patch).

 quilt/new.in |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

--- quilt.orig/quilt/new.in
+++ quilt/quilt/new.in
@@ -11,7 +11,7 @@ skip_series_check=1
 
 usage()
 {
-       printf $"Usage: quilt new [-p n|-p ab] {patchname}\n"
+       printf $"Usage: quilt new [-p n] {patchname}\n"
        if [ x$1 = x-h ]
        then
                printf $"
@@ -21,10 +21,6 @@ for grouping related patches together.
 
 -p n   Create a -p n style patch (-p0 or -p1 are supported).
 
--p ab  Create a -p1 style patch, but use a/file and b/file as the
-       original and new filenames instead of the default
-       dir.orig/file and dir/file names.
-
 Quilt can be used in sub-directories of a source tree. It determines the
 root of a source tree by searching for a %s directory above the
 current working directory. Create a %s directory in the intended root
@@ -62,10 +58,10 @@ done
 case "$opt_strip_level" in
 '' | 1)
        opt_strip_level= ;;
-0 | ab)
+0)
        ;;
 *)
-       printf $"Cannot create patches with -p%s, please specify -p0, p1, or 
-pab instead\n" \
+       printf $"Cannot create patches with -p%s, please specify -p0 or -p1 
instead\n" \
               "$opt_strip_level" >&2
        exit 1
        ;;

-- 
Jean Delvare
SUSE L3 Support

_______________________________________________
Quilt-dev mailing list
Quilt-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to