fix: Preserve Include directives and global SSH config settings #76
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.
Preserve Global SSH Configuration Directives (Include Statements)
Hello @Adembc, this PR fixes an issue where global SSH configuration directives—especially
Includestatements—were not even loaded when modifying server entries through the application.Problematic SSH Config
Key Changes
Includedirectives recursively to handle all included files.include_preservation_test.goto ensureIncludedirectives are preserved across all operations.Technical Details
config_io.go: Store and restore the implicit host block during save operations.mapper.go: Recursively processIncludedirectives to extract hosts from included files.Repositorystruct: AddedimplicitHostfield to maintain global directives.Testing
All
Includedirectives are now properly loaded and preserved when:✅ Users’ SSH config structure now remains intact, and
Includestatements continue to work as expected.Thanks for your time !