summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2014-02-21 18:26:58 +0100
committerJean Delvare <jdelvare@suse.de>2014-02-21 18:26:58 +0100
commit3059659624d735ef3a54d11de1f0a6e057b4d75b (patch)
tree7e925bb31d1f634460fb32120138f5663eeaa1ec
parentb2924b648737878d520656fa918a15a98c511d7f (diff)
downloadquilt-3059659624d735ef3a54d11de1f0a6e057b4d75b.tar.gz
patchfns: Simplify function find_patch_file further
find_patch_file is only used by "quilt import". It is called on patch file names passed on the command line. The first part of the function clearly looks for "external" patch files (with absolute or relative paths.) The second part looks for the patch in the series file. There are 3 possibilities: * If the patch is not in series, then the import fails with: Patch foo.patch does not exist * If the patch is in series, applied, then the import fails with: Patch foo.patch is applied * If the patch is in series, not applied, then the import fails with: Patch foo.patch already exists in series. So this part of the function makes no sense and should be deleted.
-rw-r--r--quilt/scripts/patchfns.in12
1 files changed, 2 insertions, 10 deletions
diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
index bd7c828..c764d41 100644
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -644,16 +644,8 @@ find_patch_file()
fi
fi
- local patch
-
- patch=$(find_patch_in_series "$name" 2>/dev/null)
- if [ -z "$patch" ]
- then
- printf $"Patch %s does not exist\n" "$name" >&2
- return 1
- fi
-
- patch_file_name "$patch"
+ printf $"Patch %s does not exist\n" "$name" >&2
+ return 1
}
file_in_patch()