Index: tools/push-to-trunk/git_recipes.py |
diff --git a/tools/push-to-trunk/git_recipes.py b/tools/push-to-trunk/git_recipes.py |
index fb7424f709478885ed5142d2dbb4c467f92b8222..e8e81fc98cbf1732a97c468734a5c60b74e3d94b 100644 |
--- a/tools/push-to-trunk/git_recipes.py |
+++ b/tools/push-to-trunk/git_recipes.py |
@@ -133,8 +133,11 @@ class GitRecipesMixin(object): |
def GitDCommit(self): |
self.Git("cl dcommit -f --bypass-hooks", retry_on=lambda x: x is None) |
Michael Achenbach
2014/03/12 15:35:06
I hope this approach has no potential for omitting
|
- def GitDiff(self, loc1, loc2): |
- return self.Git(MakeArgs(["diff", loc1, loc2])) |
+ def GitDiff(self, loc1, loc2, exclude=None): |
+ exclude = exclude or [] |
+ files = self.Git(MakeArgs(["diff", "--name-only", loc1, loc2])) |
+ files = filter(lambda f: f not in exclude, files.strip().splitlines()) |
+ return self.Git(MakeArgs(["diff", loc1, loc2] + files)) |
def GitPull(self): |
self.Git("pull") |