From 738713c708b3337fe06a21ed21a37d80a42ad7e1 Mon Sep 17 00:00:00 2001 From: Per Cederqvist Date: Thu, 22 Jan 2015 16:44:49 +0100 Subject: [PATCH] Improved doc and tests for guilt header. Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- Documentation/guilt-header.txt | 5 ++++- regression/t-028.out | 9 +++++++++ regression/t-028.sh | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/guilt-header.txt b/Documentation/guilt-header.txt index 870bfaf..71b2e66 100644 --- a/Documentation/guilt-header.txt +++ b/Documentation/guilt-header.txt @@ -18,7 +18,10 @@ Prints either the topmost patch's header or the header of a specified patch. -E:: Open the raw patch in an editor, instead of printing it. :: - Name of the patch. + Name of the patch. If a patch with exactly this name exists, + use it. Otherwise, treat the name as a regexp; if the regexp + matches a single patch, use it. Otherwise, list all matching + patch names to stderr and fail. Author ------ diff --git a/regression/t-028.out b/regression/t-028.out index ea72a3a..39ac900 100644 --- a/regression/t-028.out +++ b/regression/t-028.out @@ -56,3 +56,12 @@ Patch non-existant is not in the series remove mode patch-with-some-desc +% guilt header de +de does not uniquely identify a patch. Did you mean any of these? + mode + patch-with-some-desc +% guilt header des +blah blah blah + +Signed-off-by: Commiter Name + diff --git a/regression/t-028.sh b/regression/t-028.sh index 2ce0378..cd3088c 100755 --- a/regression/t-028.sh +++ b/regression/t-028.sh @@ -35,4 +35,7 @@ shouldfail guilt header non-existant # patch name is a regexp that just happens to match an existing patch. shouldfail guilt header '.*' +shouldfail guilt header de +cmd guilt header des + # FIXME: how do we check that -e works?