- 09 Jul, 2011 23 commits
-
-
Fix MSVC compilation warning
Vicent Martí committed -
nulltoken committed
-
The `hashfile` function has been moved to ODB, next to `git_odb_hash`. Global state has been removed from the dirent call in `status.c`, because global state is killing the rainforest and causing global warming.
Vicent Marti committed -
Throws GIT_ENOTFOUND error if given a filename that is not in HEAD, index, nor the work tree.
Jason Penny committed -
Refactored copy of test repo to a function.
Jason Penny committed -
Jason Penny committed
-
Jason Penny committed
-
Add git_status_file to be able to retrieve status of single file by supplying a path.
Jason Penny committed -
Add git_status_foreach() to run a callback on each file passing the path and a status value.
Jason Penny committed -
Jason Penny committed
-
Add git_status_hashfile() to get blob's object id for a file without adding it to the object database or needing a repository at all. This functionality is similar to `git hash-object` without '-w'.
Jason Penny committed -
Jason Penny committed
-
Vicent Marti committed
-
Ntk/fix win32 specs
Vicent Martí committed -
nulltoken committed
-
nulltoken committed
-
The direct-writes commit left some (slow) internals methods that were no longer needed. These have been removed. Also, the Reflog code was using the old `git_signature__write`, so it has been rewritten to use a normal buffer and the new `writebuf` signature writer. It's now slightly simpler and faster.
Vicent Marti committed -
DIRECT WRITES ARE BACK AND FASTER THAN EVER. The streaming writer to the ODB was an overkill for the smaller objects like Commit and Tags; most of the streaming logic was taking too long. This commit makes Commits, Tags and Trees to be built-up in memory, and then written to disk in 2 pushes (header + data), instead of streaming everything. This is *always* faster, even for big files (since the git_filebuf class still does streaming writes when the memory cache overflows). This is also a gazillion lines of code smaller, because we don't have to precompute the final size of the object before starting the stream (this was kind of defeating the point of streaming, anyway). Blobs are still written with full streaming instead of loading them in memory, since this is still the fastest way. A new `git_buf` class has been added. It's missing some features, but it'll get there.
Vicent Marti committed -
Our good, lovely folks at Microsoft decided that there was no good reason to make `vsnprintf` compilant with the C standard, so that function in Windows returns -1 on overflow, instead of returning the actual byte count needed to write the full string. We now handle this situation more gracefully with the POSIX compatibility layer, by returning the needed byte size using an auxiliary method instead of blindly resizing the target buffer until it fits. This means we can now support `printf`s of any size by allocating a temporary buffer. That's good.
Vicent Marti committed -
Vicent Marti committed
-
So far libgit2 didn't support reference logs (reflog). Add a new git_reflog_* API for basic reading and writing of reflogs: * git_reflog_read * git_reflog_write * git_reflog_free Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Vicent Marti committed
-
- 08 Jul, 2011 2 commits
-
-
reference_rename: fix flaw in force-renaming
Vicent Martí committed -
tsort: remove unused but set variable
Vicent Martí committed
-
- 07 Jul, 2011 10 commits
-
-
reference_rename didn't respect the force flag. Fixed. Reported-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Add some more test checking forced reference renaming. Signed-off-by: nulltoken <emeric.fermas@gmail.com> Acked-by: schu <schu-github@schulog.org>
nulltoken committed -
Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Vicent Marti committed
-
nulltoken committed
-
nulltoken committed
-
Vicent Marti committed
-
nulltoken committed
-
Drop the GLibc implementation of Merge Sort and replace it with Timsort. The algorithm has been tuned to work on arrays of pointers (void **), so there's no longer a need to abstract the byte-width of each element in the array. All the comparison callbacks now take pointers-to-elements, not pointers-to-pointers, so there's now one less level of dereferencing. E.g. int index_cmp(const void *a, const void *b) { - const git_index_entry *entry_a = *(const git_index_entry **)(a); + const git_index_entry *entry_a = (const git_index_entry *)(a); The result is up to a 40% speed-up when sorting vectors. Memory usage remains lineal. A new `bsearch` implementation has been added, whose callback also supplies pointer-to-elements, to uniform the Vector API again.
Vicent Marti committed -
Vicent Marti committed
-
- 06 Jul, 2011 5 commits
-
-
Fix network MSYS compilation
Vicent Martí committed -
Fix MSVC compilation warnings
Vicent Martí committed -
nulltoken committed
-
Index optimization
Vicent Martí committed -
Vicent Marti committed
-