From 8e4af372122ed076598ff7f282401ce28fc47d4a Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Fri, 16 Mar 2012 10:25:37 +0100 Subject: [PATCH] beesh: start guessing patch striplevels with 1 then 0 if a patch only contains new files from e.g. a git format-patch, the guess of strip level 0 will succeed. This should be wrong most of the time, because those files will be created in a subdirectory 'b' .. So we now start guessing with striplevel 1 followed by 0 instead of starting by 0 followed by 1 .. --- src/beesh.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/beesh.sh.in b/src/beesh.sh.in index c31e076..06c53b9 100644 --- a/src/beesh.sh.in +++ b/src/beesh.sh.in @@ -323,7 +323,7 @@ function bee_patch() { for p in ${bee_P[@]} ; do striplevel=1 - for i in 0 1 2 3 4 5 6 7 8 9 ; do + for i in 1 0 2 3 4 5 6 7 8 9 ; do if patch --dry-run -N -p$i -i "${p}" >/dev/null 2>&1 ; then striplevel=$i print_info "bee_patch(): ${p##*/}: guessed patch striplevel of ${striplevel} .."