summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | revwalk: accept committish objectsCarlos Martín Nieto2014-02-051-8/+13
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let the user push committish objects and peel them to figure out which commit to push to our queue. This is for convenience and for allowing uses of git_revwalk_push_glob(w, "tags") with annotated tags.
* | | | 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.
* | | 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.
* | Merge pull request #2095 from libgit2/update-head-reflogVicent Marti2014-02-031-1/+7
|\ \ | | | | | | 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 `git_reference_is_note`.Arthur Schreiber2014-02-021-0/+11
|/
* Enhance testing of signature parametersBen Straub2014-01-302-2/+3
|
* Provide good default reflog messages in branch apiBen Straub2014-01-301-9/+27
|
* Ensure renaming a reference updates the reflogBen Straub2014-01-303-26/+27
|
* Add reflog parameters to git_branch_moveBen Straub2014-01-301-1/+3
|
* Deleting a branch deletes its reflogBen Straub2014-01-301-0/+3
|
* Augment clone API with reflog parametersBen Straub2014-01-301-13/+23
|
* Add reflog params to git_branch_createBen Straub2014-01-302-8/+10
|
* Enhance clarityBen Straub2014-01-301-2/+4
|
* Ensure updating HEAD updates reflogBen Straub2014-01-301-3/+4
|
* Add reflog params to set-head callsBen Straub2014-01-303-20/+40
|
* Merge pull request #2085 from libgit2/rb/index-tree-blob-collisionVicent Marti2014-01-305-23/+157
|\ | | | | 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.
| * index: Implement folder-file checksVicent Marti2014-01-291-52/+50
| |
| * index: Compare with given lenVicent Marti2014-01-293-13/+127
| |
* | 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-301-1/+2
| |
* | Reorganize zstream API and fix wrap problemsRussell Belfer2014-01-303-59/+125
| | | | | | | | | | | | | | | | 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-304-6/+6
| |
* | Misc cleanupsRussell Belfer2014-01-302-23/+25
| |
* | Make submodule fetchRecurse match other optionsRussell Belfer2014-01-302-2/+10
| | | | | | | | | | | | This removes the fetchRecurse compiler warnings and makes the behavior match the other submodule options (i.e. the in-memory setting can be reset to the on-disk value).
* | Some missing oid to id renamesRussell Belfer2014-01-301-19/+22
|/
* Add `git_graph_descendant_of`.Arthur Schreiber2014-01-281-0/+14
|
* Merge pull request #2066 from libgit2/rb/builtin-diff-driversVicent Marti2014-01-273-56/+359
|\ | | | | Add built in diff drivers
| * Add PHP tests and fix bug in PHP builtin driverRussell Belfer2014-01-271-1/+1
| |
| * Update Javascript userdiff driver and testsRussell Belfer2014-01-272-3/+4
| | | | | | | | | | | | | | | | | | Writing a sample Javascript driver pointed out some extra whitespace handling that needed to be done in the diff driver. This adds some tests with some sample javascript code that I pulled off of GitHub just to see what would happen. Also, to clean up the userdiff test data, I did a "git gc" and packed up the test objects.
| * Got permission from Gustaf for userdiff patternsRussell Belfer2014-01-271-0/+4
| |
| * Add PHP and Javascript diff driversRussell Belfer2014-01-241-0/+16
| | | | | | | | | | | | | | Since I don't have permission yet on the code from Git, I decided I'd take a stab at writing patterns for PHP and Javascript myself. I think these are pretty weak, but probably better than the default behavior without them.
| * Permission for Git code from a couple moreRussell Belfer2014-01-241-0/+26
| | | | | | | | This brings over the Pascal and CSharp userdiff data.
| * Got some permission to use userdiff patternsRussell Belfer2014-01-242-38/+165
| | | | | | | | | | | | | | | | | | | | I contacted a number of Git authors and lined up their permission to relicense their work for use in libgit2 and copied over their code for diff driver xfuncname patterns. At this point, the code I've copied is taken verbatim from core Git although Thomas Rast warned me that the C++ patterns, at least, really need an update. I've left off patterns where I don't feel like I have permission at this point until I hear from more authors.
| * Implement matched pattern extract for fn headersRussell Belfer2014-01-241-3/+8
| |
| * Import git drivers and test HTML driverRussell Belfer2014-01-241-16/+43
| | | | | | | | | | | | | | | | | | | | Reorganize the builtin driver table slightly so that core Git builtin definitions can be imported verbatim. Then take a few of the core Git drivers and pull them in. This also creates a test of diffs with the builtin HTML driver which led to some small error handling fixes in the driver selection logic.
| * Initial take on builtin drivers with multilineRussell Belfer2014-01-242-43/+140
| | | | | | | | | | | | | | | | | | | | | | | | This extends the diff driver parser to support multiline driver definitions along with ! prefixing for negated matches. This brings the driver function pattern parsing in line with core Git. This also adds an internal table of driver definitions and a fallback code path that will look in that table for diff drivers that are set with attributes without having a definition in the config file. Right now, I just populated the table with a kind of simple HTML definition that is similar to the core Git def.
* | Merge pull request #2075 from libgit2/cmn/leftover-oidVicent Marti2014-01-2720-133/+133
|\ \ | | | | | | Leftover OID -> ID changes
| * | merge: rename _oid() -> id()Carlos Martín Nieto2014-01-251-3/+3
| | | | | | | | | | | | Following the rest of the series, use 'id' when refering to the value.
| * | diff: change id abbrev option's name to id_abbrevCarlos Martín Nieto2014-01-251-2/+2
| | | | | | | | | | | | | | | Same as the other commits in the series, we use 'id' when talking about thing rather than the datatype.
| * | diff: rename the file's 'oid' to 'id'Carlos Martín Nieto2014-01-2511-74/+74
| | | | | | | | | | | | In the same vein as the previous commits in this series.