Limit jit format.py to src/coreclr/src/jit (#2328)
authorSteve MacLean <Steve.MacLean@microsoft.com>
Wed, 29 Jan 2020 16:16:06 +0000 (11:16 -0500)
committerGitHub <noreply@github.com>
Wed, 29 Jan 2020 16:16:06 +0000 (11:16 -0500)
src/coreclr/tests/scripts/format.py

index 60729d6..2f122b4 100644 (file)
@@ -207,8 +207,9 @@ def main(argv):
     if returncode != 0:
         # Create a patch file
         print("Creating patch file " + patchFilePath)
+        jitSrcPath = os.path.join(coreclr, "src", "jit")
         patchFile = open(patchFilePath, "w")
-        proc = subprocess.Popen(["git", "diff", "--patch", "-U20"], env=my_env, stdout=patchFile)
+        proc = subprocess.Popen(["git", "diff", "--patch", "-U20", "--", jitSrcPath], env=my_env, stdout=patchFile)
         output,error = proc.communicate()
 
     if os.path.isdir(jitUtilsPath):