Bug 32522

Summary: gear produces diffs non-appliable by patch if there were submodule changes
Product: Sisyphus Reporter: Ivan Zakharyaschev <imz>
Component: gearAssignee: Dmitry V. Levin <ldv>
Status: NEW --- QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: glebfm, ldv, legion, placeholder
Version: unstable   
Hardware: all   
OS: Linux   
Bug Depends on:    
Bug Blocks: 17914    

Description Ivan Zakharyaschev 2016-09-23 18:06:19 MSK
gear-2.0.7-alt1

If a diff-rule (in .gear/rules) takes two trees as the arguments which include a submodule path, and the submodule commit changed between the two tree, then the diff which is produced by gear is not appliable by patch:

$ cat I2util.rej 
--- I2util
+++ I2util
@@ -1 +1 @@
-Subproject commit 9f240cdbc0051a9754d6c773558e7b0a8c1b0400
+Subproject commit b0b4dccc6a9ee47d70ec7971a52c7a6a2079fe51

Work-around: filter out the submodule paths with something like patchutils from the saved patches.

It would be nice if gear would filter them out itself since they are useless for gear's purpose.

(On another hand, the failure of such a patch can be regarded as a warning that there is an unsupported kind of diff there, namely, submodules... But I assume tha the maintainer usually knows what he is doing, and knows that there are Git submodules in the upstream, and wants to ignore them when building.)