1. 02 Dec, 2008 3 commits
    • Add a dirent walker to the fileops API · ea790f33
      Since at least MS have something like GetFirstDirEnt() and
      GetNextDirEnt() (presumably with superior performance), we
      can let MS hackers add support for a dirent walker using
      that API instead, while we stick with the posix-style
      readdir() calls.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
    • Add an io caching layer to the gitfo api · 4188d28f
      The idea is taken from Junio's work in read-cache.c, where
      it's used for writing out the index without tap-dancing on
      the poor harddrive. Since it's almost certainly useful for
      cached writing of packfiles too, we turn it into a generic
      API, making it perfectly simple to reuse it later.
      
      gitfo_write_cached() has the same contract as gitfo_write(), it
      returns GIT_SUCCESS if all bytes are successfully written (or were
      at least buffered for later writing), and <0 if an error occurs
      during buffer writing.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed
    • Remove config.h and make fileops an internal API · ec250c6e
      Since it doesn't make sense to make the disk access stuff
      portable *AND* public (that's a job for each application
      imo), we can take a shortcut and just support unixy stuff
      for now and get away with coding most of it as macros.
      
      Since we go with an internal API for starters and only
      provide higher-level API's to the libgit users, we'll be
      ok with this approach.
      
      Signed-off-by: Andreas Ericsson <ae@op5.se>
      Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
      Andreas Ericsson committed