- 09 Jul, 2011 13 commits
-
-
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 15 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
-
`git_futils_rmdir_r`: rename, clean up. `git_reference_rename`: cleanup. Do not use 3x4096 buffers on the stack or things will get ugly very fast. We can reuse the same buffer.
Vicent Marti committed -
reference_rename: git compliant reference renaming v2
Vicent Martí committed -
MSYS/MinGW uses winsock but obviously doesn't set _MSC_VER. Use _WIN32 to decide whether to use winsock or BSD headers. Also remove these headers from src/transport_git.c altogether, as they are not needed. MSYS is very conservative, so we have to tell it that we don't care about versions of Windows lower than WindowsXP. We also need to tell CMake to add ws2_32 to the libraries list and we shouldn't add the -fPIC option, to MSYS because it complains that it does it anyway. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto committed -
nulltoken committed
-
- msvc compilation warnings - not released file handle that prevents file removal
nulltoken committed -
So far libgit2 didn't handle the following scenarios: * Rename of reference m -> m/m * Rename of reference n/n -> n Fixed. Since we don't write reflogs, we have to delete any old reflog for the renamed reference. Otherwise git.git will possibly fail when it finds invalid logs. Reported-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Signed-off-by: schu <schu-github@schulog.org>
schu committed -
git_futils_rmdir_recurs() shall remove the given directory and all subdirectories. This happens only if the directories are empty. Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Signed-off-by: schu <schu-github@schulog.org>
schu committed -
the old name succeeds, e.g. refs/heads/foo -> refs/heads/foo/bar Reported-by: nulltoken <emeric.fermas@gmail.com> Signed-off-by: schu <schu-github@schulog.org>
schu committed
-