Commit Graph

5 Commits

Author SHA1 Message Date
Vicent Marti
19a30a3f6e Add new move function, gitfo_mv_force
Forces a move by creating the folder for the destination file, if it
doesn't exist.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-03-03 20:23:51 +02:00
Vicent Marti
86194b2433 Split packed from unpacked references
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>
2011-03-03 20:23:49 +02:00
Vicent Marti
c3be146840 Fix double-freeing file descriptors
Was crashing the Windows build.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-02-24 19:31:12 +02:00
Vicent Marti
5591ea15a5 Add printf method to the File Buffer
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-02-22 15:19:23 +02:00
Vicent Marti
817c28201e Rewrite all file IO for more performance
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>
2011-02-21 18:13:43 +02:00