1. 30 Oct, 2012 1 commit
    • Add git_config_refresh() API to reload config · 744cc03e
      This adds a new API that allows users to reload the config if the
      file has changed on disk.  A new config callback function to
      refresh the config was added.
      
      The modified time and file size are used to test if the file needs
      to be reloaded (and are now stored in the disk backend object).
      
      In writing tests, just using mtime was a problem / race, so I
      wanted to check file size as well.  To support that, I extended
      `git_futils_readbuffer_updated` to optionally check file size in
      addition to mtime, and I added a new function `git_filebuf_stats`
      to fetch the mtime and size for an open filebuf (so that the
      config could be easily refreshed after a write).
      
      Lastly, I moved some similar file checking code for attributes
      into filebuf.  It is still only being used for attrs, but it
      seems potentially reusable, so I thought I'd move it over.
      Russell Belfer committed