summaryrefslogtreecommitdiffstats
path: root/quilt/diff.in
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-06-12 15:31:25 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-06-12 15:31:25 +0000
commit20d7066d23e1651f8bac16ee56757d5e120410d5 (patch)
tree156f331fcec7cfd67eba5eb10e289f5b3b2f67a2 /quilt/diff.in
parent8bb20d9930841e6c233c9be926c0d79fc97c8896 (diff)
downloadquilt-20d7066d23e1651f8bac16ee56757d5e120410d5.tar.gz
- quilt/diff.in, quilt/refresh.in: Add `-p ab' options which
produce a/file and b/file filenams in headers instead of dir.orig/file and dir/file, similar to BK, git, hg patches. - Only touch .pc/$patch/.timestamp when a path actually is being refreshed.
Diffstat (limited to 'quilt/diff.in')
-rw-r--r--quilt/diff.in13
1 files changed, 10 insertions, 3 deletions
diff --git a/quilt/diff.in b/quilt/diff.in
index 25de4fb..dad2da0 100644
--- a/quilt/diff.in
+++ b/quilt/diff.in
@@ -32,6 +32,10 @@ included.
-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.
+
-u, -U num, -c, -C num
Create a unified diff (-u, -U) with num lines of context. Create
a context diff (-c, -C) with num lines of context. The number of
@@ -220,12 +224,15 @@ if [ -z "$opt_strip_level" ]
then
opt_strip_level=$(patch_strip_level $last_patch)
fi
-if [ "$opt_strip_level" != 0 -a "$opt_strip_level" != 1 ]
-then
+case "$opt_strip_level" in
+0 | 1 | ab)
+ ;;
+*)
printf $"Cannot diff patches with -p%s, please specify -p0 or -p1 instead\n" \
"$opt_strip_level" >&2
die 1
-fi
+ ;;
+esac
trap "die 1" SIGTERM