Add a newline between data json objects to prevent flagging as unchanged. #465
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I believe this fixes #463 but I have not had time to test that (which is quite tricky). But here is an explanation.
In the current code, all of the data and index .json lines are written as a single line. So if anything changes, git diff always reports this as just one line changed.
In git_add_files, changes are excluded from update if they only change a single line, and if the diff contains "generated on".
In humble, the README for package proto2ros contains the text "a ROS 2 message is generated for each one-of". Frequent word deletion removes "for each" so this becomes "generated one-of" which contains "generated on". Thus data.humble.json is blacklisted from update. So this problem is a side effect of including the README text from #452.
The proposed patch adds new-lines to each new object, so that data json files with changes will not be detected as single line changes (or so I believe). There is a small additional size added to the data json files with this.
It may take a day or two for me to test this as much as I can, but it is a pretty small change so might be worth landing as it.