diff options
Diffstat (limited to 'patchtree/patch.py')
| -rw-r--r-- | patchtree/patch.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/patchtree/patch.py b/patchtree/patch.py index 32d3b7f..bff7ee4 100644 --- a/patchtree/patch.py +++ b/patchtree/patch.py @@ -42,6 +42,9 @@ class Patch: ) def write(self, context: Context) -> None: + if context.root is not None: + self.file = str(Path(self.file).relative_to(context.root)) + diff = Diff(self.config, self.file) diff.a = File( |