mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use git's path stripping when upstreaming patches.
This commit is contained in:
parent
578498ba24
commit
d9baadd3df
2 changed files with 8 additions and 24 deletions
|
@ -69,7 +69,7 @@ class GitTree(wptupdate.tree.GitTree):
|
|||
data = self.git("log", *args)
|
||||
return [self.commit_cls(self, sha1) for sha1 in data.split("\0") if sha1]
|
||||
|
||||
def import_patch(self, patch):
|
||||
def import_patch(self, patch, strip_count):
|
||||
"""Import a patch file into the tree and commit it
|
||||
|
||||
:param patch: a Patch object containing the patch to import
|
||||
|
@ -79,7 +79,7 @@ class GitTree(wptupdate.tree.GitTree):
|
|||
f.write(patch.diff)
|
||||
f.flush()
|
||||
f.seek(0)
|
||||
self.git("apply", "--index", f.name)
|
||||
self.git("apply", "--index", f.name, "-p", str(strip_count))
|
||||
self.git("commit", "-m", patch.message.text, "--author=%s" % patch.full_author)
|
||||
|
||||
def rebase(self, ref, continue_rebase=False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue