summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Split p_strlen into its own headerCarlos Martín Nieto2014-02-053-13/+25
| | | | | | | | | We need this from util.h and posix.h, but the latter includes common.h which includes util.h, which means p_strlen is not defined by the time we get to git__strndup(). Split the definition on p_strlen() off into its own header so we can use it in util.h.
* utils: don't reimplement strnlenCarlos Martín Nieto2014-02-051-2/+2
| | | | | The standard library provides a very nice strnlen function, which knows to use SSE, let's not reimplement it ourselves.
* commit: faster parsingCarlos Martín Nieto2014-02-051-28/+12
| | | | | | | | | | | | | | | | | | The current code issues a lot of strncmp() calls in order to check for the end of the header, simply in order to copy it and start going through it again. These are a lot of calls for something we can check as we go along. Knowing the amount of parents beforehand to reduce allocations in extreme cases does not make up for them. Instead start parsing immediately and check for the double-newline after each header field, leaving the raw_header allocation for the end, which lets us go through the header once and reduces the amount of strncmp() calls significantly. In unscientific testing, this has reduced a shortlog-like usage (walking though the whole history of a branch and extracting data from the commits) of git.git from ~830ms to ~700ms and makes the time we spend in strncmp() negligible.
* docs: produce literal asterisksCarlos Martín Nieto2014-02-051-2/+2
|
* Merge pull request #2096 from ethomson/mergeVicent Marti2014-02-042-7/+326
|\ | | | | Corrections for merge working directory validation
| * Remove unused pointer assignmentEdward Thomson2014-02-031-1/+1
| |
| * Merge wd validation tests against index not HEADEdward Thomson2014-02-031-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | Validating the workdir should not compare HEAD to working directory - this is both inefficient (as it ignores the cache) and incorrect. If we had legitimately allowed changes in the index (identical to the merge result) then comparing HEAD to workdir would reject these changes as different. Further, this will identify files that were filtered strangely as modified, while testing with the cache would prevent this. Also, it's stupid slow.
| * Test that emulates a strange filter implementationEdward Thomson2014-02-031-0/+70
| |
| * Tests merging staged files identical to resultEdward Thomson2014-02-031-0/+70
| |
| * Tests merge when changes exist in workdir/indexEdward Thomson2014-02-031-0/+182
|/
* Merge pull request #2095 from libgit2/update-head-reflogVicent Marti2014-02-032-14/+45
|\ | | | | Correct "new" id for reattached-HEAD reflog entry
| * Check for errors when dereferencing symbolic refsBen Straub2014-02-011-2/+6
| |
| * Reflog: correct "new" id for reattaching HEADBen Straub2014-02-011-1/+3
| |
| * Add failing test caseBen Straub2014-02-011-13/+38
| |
* | Merge pull request #2098 from arthurschreiber/arthur/add-git_reference_is_noteVicent Marti2014-02-023-0/+36
|\ \ | |/ |/| Add `git_reference_is_note`.
| * Add `git_reference_is_note`.Arthur Schreiber2014-02-023-0/+36
|/
* Merge pull request #2092 from libgit2/rb/update-clarVicent Marti2014-01-311-5/+13
|\ | | | | Update to latest clar
| * Update to latest clarRussell Belfer2014-01-311-5/+13
|/
* Merge pull request #2081 from libgit2/bs/reflogVicent Marti2014-01-3123-139/+480
|\ | | | | Reflog completionism
| * Allow tests to run without user configBen Straub2014-01-302-0/+12
| |
| * Enhance testing of signature parametersBen Straub2014-01-307-13/+51
| |
| * Document branch-creation reflog betterBen Straub2014-01-301-1/+3
| |
| * Provide good default reflog messages in branch apiBen Straub2014-01-303-9/+65
| |
| * Ensure moving a branch updates the reflogBen Straub2014-01-301-0/+19
| |
| * Ensure renaming a reference updates the reflogBen Straub2014-01-307-41/+64
| |
| * Add reflog parameters to git_branch_moveBen Straub2014-01-303-15/+23
| |
| * Deleting a branch deletes its reflogBen Straub2014-01-303-20/+29
| |
| * Augment clone API with reflog parametersBen Straub2014-01-304-15/+74
| |
| * Add reflog params to git_branch_createBen Straub2014-01-307-23/+35
| |
| * Add passing reflog testsBen Straub2014-01-301-1/+29
| |
| * Ensure creating HEAD creates its reflogBen Straub2014-01-301-0/+21
| |
| * Enhance clarityBen Straub2014-01-301-2/+4
| |
| * Ensure updating HEAD updates reflogBen Straub2014-01-302-3/+27
| |
| * Add reflog params to set-head callsBen Straub2014-01-309-45/+73
|/
* Merge pull request #2085 from libgit2/rb/index-tree-blob-collisionVicent Marti2014-01-306-23/+263
|\ | | | | Index tree-bob collision
| * Fix checkout NONE to not remove fileRussell Belfer2014-01-301-1/+1
| | | | | | | | If you are checking out NONE, then don't remove.
| * Rename conflict to collision to prevent confusionRussell Belfer2014-01-301-2/+2
| |
| * Force explicit remove of files instead of deferRussell Belfer2014-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The checkout code used to defer removal of "blocking" files in checkouts until the blocked item was actually being written (since we have already checked that the removing the block is acceptable according to the update rules). Unfortunately, this resulted in an intermediate index state where both the blocking and new items were in the index which is no longer allowed. Now we just remove the blocking item in the first pass so it never needs to coexist. In cases where there are typechanges, this could result in a bit more churn of removing and recreating intermediate directories, but I'm going to assume that is an unusual case and the churn will not be too costly.
| * Two-phase index mergingEdward Thomson2014-01-291-5/+14
| | | | | | | | | | | | | | | | | | When three-way merging indexes, we previously changed each path as we read them, which would lead to us adding an index entry for 'foo', then removing an index entry for 'foo/file'. With the new index requirements, this is not allowed. Removing entries in the merged index, then adding them, resolves this. In the previous example, we now remove 'foo/file' before adding 'foo'.
| * Give index_isrch the same semantics as index_srchEdward Thomson2014-01-291-5/+16
| | | | | | | | | | | | In case insensitive index mode, we would stop at a prefixed entry, treating the provided search key length as a substring, not the length of the string to match.
| * More index collision testsEdward Thomson2014-01-291-0/+64
| |
| * index: Implement folder-file checksVicent Marti2014-01-291-52/+50
| |
| * index: Compare with given lenVicent Marti2014-01-293-13/+127
| |
| * Add test for blob/tree name collisions in indexRussell Belfer2014-01-291-0/+42
| |
* | Merge pull request #2091 from libgit2/rb/cleanups-123Vicent Marti2014-01-3018-138/+376
|\ \ | | | | | | Fix errors with zstream (and a variety of other cleanups)
| * | Defer zstream NUL termination to endRussell Belfer2014-01-301-2/+5
| | | | | | | | | | | | | | | And don't terminate if there isn't space for it (since it's binary data, it's not worth a reallocation).
| * | Expand zstream tests and fix off-by-one errorRussell Belfer2014-01-302-18/+64
| | |
| * | Reorganize zstream API and fix wrap problemsRussell Belfer2014-01-304-59/+223
| | | | | | | | | | | | | | | | | | | | | | | | There were some confusing issues mixing up the number of bytes written to the zstream output buffer with the number of bytes consumed from the zstream input. This reorganizes the zstream API and makes it easier to deflate an arbitrarily large input while still using a fixed size output.
| * | Some fixes for Windows x64 warningsRussell Belfer2014-01-305-7/+7
| | |
| * | Misc cleanupsRussell Belfer2014-01-303-24/+25
| | |