style: improve compatibility with old git versions
authorCurtis Dunham <Curtis.Dunham@arm.com>
Thu, 28 Apr 2016 14:17:50 +0000 (15:17 +0100)
committerCurtis Dunham <Curtis.Dunham@arm.com>
Thu, 28 Apr 2016 14:17:50 +0000 (15:17 +0100)
Older versions of git need the '=' to connect --diff-filter to
its argument.

Change-Id: Ic62057567db061684be88a7c2d80a6a5d4c11dcf

util/style/repo.py

index 1943e48b62912c944a3191210c847564b1836b24..adcbdc95f12d9fe5bd9677b74e368395ab56395f 100644 (file)
@@ -185,7 +185,7 @@ class GitRepo(AbstractRepo):
         if cached:
             cmd.append("--cached")
         if filter:
-            cmd += [ "--diff-filter", filter ]
+            cmd += [ "--diff-filter=%s" % filter ]
         cmd += [ self.head_revision(), "--" ] + files
         status = subprocess.check_output(cmd).rstrip("\n")