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

when setting config keys, validate against struct before writing to disk #742

Merged
merged 4 commits into from
Feb 4, 2015

Commits on Feb 4, 2015

  1. fix(repo/config) validate against struct before writing to disk

    When setting config keys, the program doesn't know whether the
    key-to-be-modified exists on the Config struct. (Perhaps, with
    reflection, it is possible to find the field). To allow callers to write
    non-existent keys, the program would...
    
    Before:
    1) converts the in-memory *Config to a map
    2) sets the key on the map, and
    3) writes this map to disk.
    4) Then, it converts this map back into an in-memory struct.
    
    This commit swaps 3 and 4 so the map can be validated against the struct
    before being written to disk. This prevents the bug identified in #740.
    Brian Tiger Chow committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    d1da1d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bbc9715 View commit details
    Browse the repository at this point in the history
  3. fix(repo/config) detect strings that represent ints

    Brian Tiger Chow committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    bbcbf46 View commit details
    Browse the repository at this point in the history
  4. fix(config) use max backups to limit number of backups

    Brian Tiger Chow committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    faded48 View commit details
    Browse the repository at this point in the history