summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-04-16 09:45:23 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-04-16 09:45:42 +0200
commit6fa898d06e6cb1058a3f38dc54cb2be14192aadf (patch)
tree8d61d2decb1c5893d05293c75a342a7944c8cc48 /lib
parent3e668cc3e1c3abfeef845af402493027d34f5a46 (diff)
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 <johannes.berg@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/patch.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/patch.py b/lib/patch.py
index 878aa3c3..b5949fd7 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)