summaryrefslogtreecommitdiff
path: root/src/filebuf.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix creation of deeply-rooted referencesVicent Marti2011-03-051-1/+6
| | | | | | | Use a new `gitfo_creat_force` that will create the full path to a file before creating it. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Add new move function, `gitfo_mv_force`Vicent Marti2011-03-031-1/+1
| | | | | | | Forces a move by creating the folder for the destination file, if it doesn't exist. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Split packed from unpacked referencesVicent Marti2011-03-031-3/+0
| | | | | | | | These two reference types are now stored separately to eventually allow the removal/renaming of loose references and rewriting of the refs packfile. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Fix double-freeing file descriptorsVicent Marti2011-02-241-2/+5
| | | | | | Was crashing the Windows build. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Add printf method to the File BufferVicent Marti2011-02-221-0/+25
| | | | Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Rewrite all file IO for more performanceVicent Marti2011-02-211-0/+261
The new `git_filebuf` structure provides atomic high-performance writes to disk by using a write cache, and optionally a double-buffered scheme through a worker thread (not enabled yet). Writes can be done 3-layered, like in git.git (user code -> write cache -> disk), or 2-layered, by writing directly on the cache. This makes index writing considerably faster. The `git_filebuf` structure contains all the old functionality of `git_filelock` for atomic file writes and reads. The `git_filelock` structure has been removed. Additionally, the `git_filebuf` API allows to automatically hash (SHA1) all the data as it is written to disk (hashing is done smartly on big chunks to improve performance). Signed-off-by: Vicent Marti <tanoku@gmail.com>