Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ssh config include #2307

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Commits on Jan 30, 2024

  1. Configuration menu
    Copy the full SHA
    19d8aa8 View commit details
    Browse the repository at this point in the history
  2. Add support for relative includes from user home

    Based on the ssh_config man pages relative includes should use
    the default ssh config home (~/.ssh) as a base
    mrmeszaros committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    82b95d5 View commit details
    Browse the repository at this point in the history
  3. Make include handle invalid paths

    Just as openssh, it will currently silently ignore missing files.
    mrmeszaros committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    b042222 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a5d280c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b06cc2f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f8271c5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7208ecf View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8cef3b2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    356efab View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b9998fb View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    dec4a04 View commit details
    Browse the repository at this point in the history
  12. Make includes load in order

    This solution is kind of hacky, as it breaks up the context blocks into
    parts based on the `Include`, so that they are used in the order of
    definition and not at the end of the block.
    
    A proper solution would be to use an ordered collection of options,
    during parsing, that ensures ordered lookup during the lookup phase.
    
    OrderedDict was tried as a drop-in, but it is not sufficient enough,
    as defined in the include-order-2 test case.
    mrmeszaros committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    d7191d0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    dac83c3 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    0bb524f View commit details
    Browse the repository at this point in the history
  15. Remove unused deprecated self._config field

    The storage of the parsed configs might need to be reviewed,
    as the include support introduced complexity.
    
    Due to how includes work, the order of the include is also relevant
    during lookup time.
    
    One possible solution would be to flatten the parsed config:
    to compile the host/match conditions through includes during parsing.
    This way the lookup could be much simpler.
    mrmeszaros committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    1ec4d95 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. Configuration menu
    Copy the full SHA
    4b7142e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    39d82a1 View commit details
    Browse the repository at this point in the history