summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | path: Make direach() return EUSER on callback errornulltoken2013-09-104-13/+25
| | | |
* | | | odb: Error when streaming in too [few|many] bytesnulltoken2013-09-071-0/+27
|/ / /
* | | revparse: Simplify error handlingnulltoken2013-09-071-11/+3
| | |
* | | revparse: Prevent unnecessary odb backend callsnulltoken2013-09-071-6/+3
| | |
* | | Merge pull request #1791 from libgit2/cmn/revwalk-recursiveRussell Belfer2013-09-062-10/+34
|\ \ \ | | | | | | | | revwalk: make mark_unintersting use a loop
| * | | revwalk: make mark_unintersting use a loopCarlos Martín Nieto2013-09-062-10/+34
| | |/ | |/| | | | | | | | | | | | | | | | Using a recursive function can blow the stack when dealing with long histories. Use a loop instead to limit the call chain depth. This fixes #1223.
* | | odb: Prevent stream_finalize_write() from overwritingnulltoken2013-09-062-7/+4
| | | | | | | | | | | | | | | | | | Now that #1785 is merged, git_odb_stream_finalize_write() calculates the object id before invoking the odb backend. This commit gives a chance to the backend to check if it already knows this object.
* | | Merge pull request #1829 from libgit2/fix-umask-fragilityVicent Martí2013-09-056-21/+22
|\ \ \ | |_|/ |/| | Fix umask fragility
| * | Better macro name for is-exec-bit-set testRussell Belfer2013-09-054-6/+6
| | |
| * | GIT_MODE_TYPE should exclude setgid bitsRussell Belfer2013-09-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The GIT_MODE_TYPE macro was looking at all bits above the permissions, but it should really just look at the top bits so that it will give the right results for a setgid or setuid entry. Since we're now using these macros in the tests, this was causing a test failure on platforms that don't support setgid.
| * | Add more file mode permissions macrosRussell Belfer2013-09-056-20/+20
| | | | | | | | | | | | | | | | | | This adds some more macros for some standard operations on file modes, particularly related to permissions, and then updates a number of places around the code base to use the new macros.
* | | Merge pull request #1831 from linquize/version.h-warningVicent Martí2013-09-051-1/+1
|\ \ \ | |/ / |/| | Fix warning in src/win32/version.h
| * | Fix warning in src/win32/version.hLinquize2013-09-051-1/+1
| | |
* | | Provide better errors for push on non-bare local remotesBen Straub2013-09-041-1/+2
| | |
* | | Merge pull request #1817 from libgit2/ntk/fix/backend/honor_refresh_capabilitiesVicent Martí2013-09-042-36/+78
|\ \ \ | | | | | | | | Of backends and refreshers...
| * | | odb: Move the auto refresh logic to the pack backendnulltoken2013-09-042-38/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, `git_object_read()`, `git_object_read_prefix()` and `git_object_exists()` were implementing an auto refresh logic. When the expected object couldn't be found in any backend, a call to `git_odb_refresh()` was triggered and the lookup was once again performed against all backends. This commit removes this auto-refresh logic from the odb layer and pushes it down into the pack-backend (as it's the only one currently exposing a `refresh()` endpoint).
| * | | odb: Code beautificationnulltoken2013-08-301-3/+6
| | | |
| * | | odb: Honor the non refreshing capability of a backendnulltoken2013-08-301-3/+3
| | | |
* | | | Backport @peff's fix for duplicates in sha1_lookupVicent Marti2013-09-041-0/+47
| |/ / |/| |
* | | Fix resolving relative windows network pathsRussell Belfer2013-09-031-2/+2
| | |
* | | Merge pull request #1804 from ethomson/rewritesVicent Martí2013-09-032-3/+9
|\ \ \ | | | | | | | | Minor changes for rewrites
| * | | Split rewrites, status doesn't return rewritesEdward Thomson2013-08-282-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that we apply splits to rewrites, even if we're not interested in examining it closely for rename/copy detection. In keeping with core git, status should not display rewrites, it should simply show files as "modified".
* | | | Merge pull request #1825 from nvloff/resolve_relativeRussell Belfer2013-09-031-5/+26
|\ \ \ \ | | | | | | | | | | path: properly resolve relative paths
| * | | | path: properly resolve relative pathsNikolai Vladimirov2013-09-031-5/+26
| | | | |
* | | | | Merge pull request #1814 from libgit2/is-empty-fixVicent Martí2013-09-031-12/+8
|\ \ \ \ \ | |/ / / / |/| | | | Fix incorrect precedence within git_repository_is_empty()
| * | | | Treat detached HEAD as non-empty repoRussell Belfer2013-08-291-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the git_repository_is_empty a bit so that a detached HEAD is just taken to mean the repo is not empty, since a newly initialized repo will not have a detached HEAD.
| * | | | repository: Make the is_empty check more explicitVicent Martí2013-08-291-1/+3
| | | | |
| * | | | Fix incorrect precedence within git_repository_is_empty()Justin Spahr-Summers2013-08-281-1/+1
| | |/ / | |/| | | | | | | | | | Reverts part of 9146f1e57ec4f2b6fa293c78d54f1383464ff5be.
* | | | Use git__insertsort_r on Android too.Krzysztof Adamski2013-09-011-1/+1
| | | |
* | | | oid: git_oid_shorten_add() sets GITERR_INVALID when OID set is fullLinquize2013-08-311-3/+12
|/ / /
* | | Add stddef include for sortedcacheRussell Belfer2013-08-281-0/+2
| | | | | | | | | | | | | | | All use of sortedcache will need this header, so put it in the definition of the sortedcache API.
* | | Merge pull request #1805 from libgit2/threading-packed-loadVicent Martí2013-08-2813-536/+1102
|\ \ \ | |/ / |/| | Thread safety for the refdb_fs
| * | Convert to our own SRWLOCK type on Win32Russell Belfer2013-08-273-4/+4
| | |
| * | Fix MINGW SRWLock typedefsRussell Belfer2013-08-262-2/+2
| | |
| * | Load SRWLock APIs at runtimeRussell Belfer2013-08-265-20/+102
| | | | | | | | | | | | | | | | | | This loads SRWLock APIs at runtime and in their absence (i.e. on Windows before Vista) falls back on a regular CRITICAL_SECTION that will not permit concurrent readers.
| * | Fix sortedcache docs and other feedbackRussell Belfer2013-08-222-11/+32
| | | | | | | | | | | | | | | | | | | | | This converts an internal lock from a write lock to a read lock where write isn't needed, and also clarifies some doc things about where various locks are acquired and how various APIs are intended to be used.
| * | Trying to fix Win32 warningsRussell Belfer2013-08-224-11/+17
| | |
| * | Drop support for THREADSAFE on Windows XPRussell Belfer2013-08-221-1/+13
| | | | | | | | | | | | | | | This makes libgit2 require Windows Vista or newer if it is going to be compiled with the THREADSAFE option
| * | Add SRWLock implementation of rwlocks for Win32Russell Belfer2013-08-223-3/+58
| | |
| * | A bit of item alignment paranoiaRussell Belfer2013-08-221-4/+7
| | |
| * | Convert sortedcache to use rwlockRussell Belfer2013-08-224-175/+244
| | | | | | | | | | | | | | | This is the first use we have of pthread_rwlock_t in libgit2. Hopefully it won't cause any serious portability problems.
| * | Improve comments on locking for sortedcache APIsRussell Belfer2013-08-211-10/+21
| | |
| * | No need to lock newly created tgt in copyRussell Belfer2013-08-211-4/+0
| | |
| * | Fix warnings when compiling without threadsRussell Belfer2013-08-211-0/+2
| | |
| * | Rewrite refdb_fs using git_sortedcache objectRussell Belfer2013-08-211-496/+314
| | | | | | | | | | | | | | | | | | | | | | | | This adds thread safety to the refdb_fs by using the new git_sortedcache object and also by relaxing the handling of some filesystem errors where the fs may be changed out from under us. This also adds some new threading tests that hammer on the refdb.
| * | Add internal ref set_name fn instead of reallocRussell Belfer2013-08-212-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | The refdb_fs implementation calls realloc directly on a reference object when it wants to rename it. It is not a public object, so this doesn't mess with the immutability of references, but it does assume certain constraints on the reference representation. This commit wraps that assumption in an isolated API to isolate it.
| * | Add sortedcache APIs to lookup index and removeRussell Belfer2013-08-212-0/+66
| | | | | | | | | | | | This adds two other APIs that I need to the sortedcache type.
| * | Add sorted cache data typeRussell Belfer2013-08-203-0/+403
| | | | | | | | | | | | | | | | | | | | | | | | This adds a convenient new data type for caching the contents of file in memory when each item in that file corresponds to a name and you need to both be able to lookup items by name and iterate over them in some sorted order. The new data type has locks in place to manage usage in a threaded environment.
| * | Don't try to pack symbolic refsRussell Belfer2013-08-201-1/+10
| | | | | | | | | | | | | | | | | | If there were symbolic refs among the loose refs then the code to create packed-refs would fail trying to parse the OID out of them (where Git just skips trying to pack them). This fixes it.
* | | Merge pull request #1803 from libgit2/ntk/topic/even_more_lenient_remote_parsingVicent Martí2013-08-284-16/+46
|\ \ \ | | | | | | | | Even more lenient remote parsing