@@ -75,16 +75,37 @@ def get_src_files(since: Optional[str]) -> List[str]:
75
75
output = subprocess .check_output (["git" , "ls-files" ] + file_patterns ,
76
76
universal_newlines = True )
77
77
src_files = output .split ()
78
+ output = subprocess .check_output (["git" , "-C" , "framework" , "ls-files" ]
79
+ + file_patterns , universal_newlines = True )
80
+ framework_src_files = output .split ()
81
+
78
82
if since :
79
- # get all files changed in commits since the starting point
80
- cmd = ["git" , "log" , since + "..HEAD" , "--name-only" , "--pretty=" , "--" ] + src_files
83
+ # get all files changed in commits since the starting point in ...
84
+ # ... the main repository
85
+ cmd = ["git" , "log" , since + "..HEAD" , "--ignore-submodules" ,
86
+ "--name-only" , "--pretty=" , "--" ] + src_files
81
87
output = subprocess .check_output (cmd , universal_newlines = True )
82
88
committed_changed_files = output .split ()
83
- # and also get all files with uncommitted changes
89
+ # ... the framework submodule
90
+ cmd = ["git" , "-C" , "framework" , "log" , since + "..HEAD" ,
91
+ "--name-only" , "--pretty=" , "--" ] + framework_src_files
92
+ output = subprocess .check_output (cmd , universal_newlines = True )
93
+ committed_changed_files += ["framework/" + s for s in output .split ()]
94
+
95
+ # and also get all files with uncommitted changes in ...
96
+ # ... the main repository
84
97
cmd = ["git" , "diff" , "--name-only" , "--" ] + src_files
85
98
output = subprocess .check_output (cmd , universal_newlines = True )
86
99
uncommitted_changed_files = output .split ()
87
- src_files = list (set (committed_changed_files + uncommitted_changed_files ))
100
+ # ... the framework submodule
101
+ cmd = ["git" , "-C" , "framework" , "diff" , "--name-only" , "--" ] + \
102
+ framework_src_files
103
+ output = subprocess .check_output (cmd , universal_newlines = True )
104
+ uncommitted_changed_files += ["framework/" + s for s in output .split ()]
105
+
106
+ src_files = committed_changed_files + uncommitted_changed_files
107
+ else :
108
+ src_files += ["framework/" + s for s in framework_src_files ]
88
109
89
110
generated_files = list_generated_files ()
90
111
# Don't correct style for third-party files (and, for simplicity,
0 commit comments