From 6fa898d06e6cb1058a3f38dc54cb2be14192aadf Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 16 Apr 2013 09:45:23 +0200 Subject: [PATCH] patch library: don't use -p1 for git patches For git patches, the patch library will automatically use -p1 and strip the a/ b/ filename prefix, while for other patches it uses -p0 and doesn't strip anything. We usually use a/ b/ prefixes even when the patches aren't in the git format and strip a path in gentree, so remove this from the library. Signed-off-by: Johannes Berg --- lib/patch.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/patch.py b/lib/patch.py index 878aa3c3db33..b5949fd7328f 100644 --- a/lib/patch.py +++ b/lib/patch.py @@ -626,21 +626,6 @@ class PatchSet(object): return None """ - for i,p in enumerate(self.items): - if p.type in (HG, GIT): - # TODO: figure out how to deal with /dev/null entries - debug("stripping a/ and b/ prefixes") - if p.source != '/dev/null': - if not p.source.startswith("a/"): - warning("invalid source filename") - else: - p.source = p.source[2:] - if p.target != '/dev/null': - if not p.target.startswith("b/"): - warning("invalid target filename") - else: - p.target = p.target[2:] - p.source = xnormpath(p.source) p.target = xnormpath(p.target) -- 2.30.2