- 17 Sep, 2012 6 commits
- 15 Sep, 2012 1 commit
-
-
Allocate a buffer large enough to store the path plus the terminator instead of letting readlink write beyond the end.
Carlos Martín Nieto committed
-
- 14 Sep, 2012 10 commits
-
-
odb_pack: make sure to search all backends
Vicent Martí committed -
last_found is the last packfile a wanted object was found in. Since last_found is shared among all searching threads, it might changes while we're searching. As suggested by @arrbee, put a copy on the stack to fix the race condition.
Michael Schubert committed -
refs: prevent locked refs from being enumerated
Vicent Martí committed -
Fix #936
nulltoken committed -
Defining the BOM as a string makes the array include the NUL-terminator, which means that the memcpy is going to check for that as well and thus never match for a nonempty file. Define the array as three chars, which makes the size correct.
Carlos Martín Nieto committed -
I don't think clone.c needs in #include dirent.h and it is not portable, so let's just get rid of it.
Russell Belfer committed -
Fix MSVC compilation warnings
Russell Belfer committed -
nulltoken committed
-
pack: iterate objects in offset order
Vicent Martí committed -
Compute the ordering on demand and persist until the index is freed.
David Michael Barr committed
-
- 13 Sep, 2012 1 commit
-
-
The winhttp branch was based on a version before these existed, so the build broke on Windows.
Carlos Martín Nieto committed
-
- 14 Sep, 2012 2 commits
-
-
http: use WinHTTP on Windows
Vicent Martí committed -
Wondows has its own HTTP library. Use that one when possible instead of our own. As we don't depend on them anymore, remove the http-parser library from the Windows build, as well as the search for OpenSSL.
Carlos Martín Nieto committed
-
- 13 Sep, 2012 10 commits
-
-
Fix error text s/buffer too long/buffer too short/
Vicent Martí committed -
Sascha Cunz committed
-
Fix problems in diff iterator record chaining
Vicent Martí committed -
The last change tweaked the way we use the hunk_curr pointer during iteration, but failed to reset the value back to NULL when switching files.
Russell Belfer committed -
refspec: No remote tracking ref from a fetchspec-less remote
Vicent Martí committed -
nulltoken committed
-
There is a bug in building the linked list of line records in the diff iterator and also an off by one element error in the hunk counts. This fixes both of these, adds some test data with more complex sets of hunk and line diffs to exercise this code better.
Russell Belfer committed -
Add git_repository_hashfile to hash with filters
Vicent Martí committed -
odb_pack: try lookup before refreshing packs
Vicent Martí committed -
Michael Schubert committed
-
- 12 Sep, 2012 2 commits
-
-
This reduces the rate of syscalls for the common case of sequences of object reads from the same pack. Best of 5 timings for libgit2_clar before this patch: real 0m5.375s user 0m0.392s sys 0m3.564s After applying this patch: real 0m5.285s user 0m0.356s sys 0m3.544s 0.6% improvement in system time. 9.2% improvement in user time. 1.7% improvement in elapsed time. Confirmed a 0.6% reduction in number of system calls with strace. Expect greater improvement for graph-traversal with large packs.
David Michael Barr committed -
Fixed some minor `git_repository_hashfile` issues: - Fixed incorrect doc (saying that repo could be NULL) - Added checking of object type value to acceptable ones - Added more tests for various parameter permutations
Russell Belfer committed
-
- 11 Sep, 2012 8 commits
-
-
The existing `git_odb_hashfile` does not apply text filtering rules because it doesn't have a repository context to evaluate the correct rules to apply. This adds a new hashfile function that will apply repository-specific filters (based on config, attributes, and filename) before calculating the hash.
Russell Belfer committed -
git_mergebase: Constness-Fix for consistency
Vicent Martí committed -
Vicent Marti committed
-
Vicent Marti committed
-
In the process of adding tests for the max file size threshold (which treats files over a certain size as binary) there seem to be a number of problems in the new code with detecting binaries. This should fix those up, as well as add a test for the file size threshold stuff. Also, this un-deprecates `GIT_DIFF_LINE_ADD_EOFNL`, since I finally found a legitimate situation where it would be returned.
Russell Belfer committed -
cache: fix race condition
Vicent Martí committed -
Example: a cached node is owned only by the cache (refcount == 1). Thread A holds the lock and determines that the entry which should get cached equals the node (git_oid_cmp(&node->oid, &entry->oid) == 0). It frees the given entry to instead return the cached node to the user (entry = node). Now, before Thread A happens to increment the refcount of the node *outside* the cache lock, Thread B tries to store another entry and hits the slot of the node before, decrements its refcount and frees it *before* Thread A gets a chance to increment for the user. git_cached_obj_incref(entry); git_mutex_lock(&cache->lock); { git_cached_obj *node = cache->nodes[hash & cache->size_mask]; if (node == NULL) { cache->nodes[hash & cache->size_mask] = entry; } else if (git_oid_cmp(&node->oid, &entry->oid) == 0) { git_cached_obj_decref(entry, cache->free_obj); entry = node; } else { git_cached_obj_decref(node, cache->free_obj); // Thread B is here cache->nodes[hash & cache->size_mask] = entry; } } git_mutex_unlock(&cache->lock); // Thread A is here /* increase the refcount again, because we are * returning it to the user */ git_cached_obj_incref(entry);
Michael Schubert committed -
Fix logical error in git_index_set_caps
Russell Belfer committed
-