summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* libgit2 v0.19.0 "gut merge"v0.19.0Vicent Marti2013-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Minor point release! We got a lot of rather large features that we wanted to get settled in: - New (threadsafe) cache for objects - Iterator for Status - New Merge APIs - SSH support on *NIX - Function context on diff - Namespaces support - Index add/update/remove with wildcard support - Iterator for References - Fetch and push refspecs for Remotes - Rename support in Status - New 'sys/` namespace for external headers with low-level APIs As always, this comes with hundreds of bug fixes and performance improvements. We're faster and better than ever. And we haven't broken many APIs this time! Build stuff.
* Fixed most documentation header bugsAndreas Linde2013-06-2417-35/+35
| | | | | | | | | | | Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode. The following warnings have not been fixed: common.h:213 - Not sure how the documentation format is for '...' notes.h:102 - Correct @param name but empty text notes.h:111 - Correct @param name but empty text pack.h:140 - @return missing text pack.h:148 - @return missing text
* Add target directory to checkoutRussell Belfer2013-06-211-0/+2
| | | | | | | | | | | | | | | | This adds the ability for checkout to write to a target directory instead of having to use the working directory of the repository. This makes it easier to do exports of repository data and the like. This is similar to, but not quite the same as, the --prefix option to `git checkout-index` (this will always be treated as a directory name, not just as a simple text prefix). As part of this, the workdir iterator was extended to take the path to the working directory as a parameter and fallback on the git_repository_workdir result only if it's not specified. Fixes #1332
* Fix checkout of modified file when missing from wdRussell Belfer2013-06-211-0/+2
| | | | | | | | | | This fixes the checkout case when a file is modified between the baseline and the target and yet missing in the working directory. The logic for that case appears to have been wrong. This also adds a useful checkout notify callback to the checkout test helpers that will count notifications and also has a debug mode to visualize what checkout thinks that it's doing.
* Add status flags to force output sort orderRussell Belfer2013-06-201-0/+8
| | | | | | | | | | | | | | | | Files in status will, be default, be sorted according to the case insensitivity of the filesystem that we're running on. However, in some cases, this is not desirable. Even on case insensitive file systems, 'git status' at the command line will generally use a case sensitive sort (like 'ls'). Some GUIs prefer to display a list of file case insensitively even on case-sensitive platforms. This adds two new flags: GIT_STATUS_OPT_SORT_CASE_SENSITIVELY and GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY that will override the default sort order of the status output and give the user control. This includes tests for exercising these new options and makes the examples/status.c program emulate core Git and always use a case sensitive sort.
* Add index pathspec-based operationsRussell Belfer2013-06-191-0/+115
| | | | | | | | | | | | | This adds three new public APIs for manipulating the index: 1. `git_index_add_all` is similar to `git add -A` and will add files in the working directory that match a pathspec to the index while honoring ignores, etc. 2. `git_index_remove_all` removes files from the index that match a pathspec. 3. `git_index_update_all` updates entries in the index based on the current contents of the working directory, either added the new information or removing the entry from the index.
* Add "as_path" parameters to blob and buffer diffsRussell Belfer2013-06-171-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | This adds parameters to the four functions that allow for blob-to- blob and blob-to-buffer differencing (either via callbacks or by making a git_diff_patch object). These parameters let you say that filename we should pretend the blob has while doing the diff. If you pass NULL, there should be no change from the existing behavior, which is to skip using attributes for file type checks and just look at content. With the parameters, you can plug into the new diff driver functionality and get binary or non-binary behavior, plus function context regular expressions, etc. This commit also fixes things so that the git_diff_delta that is generated by these functions will actually be populated with the data that we know about the blobs (or buffers) so you can use it appropriately. It also fixes a bug in generating patches from the git_diff_patch objects created via these functions. Lastly, there is one other behavior change that may matter. If there is no difference between the two blobs, these functions no longer generate any diff callbacks / patches unless you have passed in GIT_DIFF_INCLUDE_UNMODIFIED. This is pretty natural, but could potentially change the behavior of existing usage.
* Clarify some docs and minor reorderingRussell Belfer2013-06-171-92/+89
| | | | | | | This simplifies some documentation and hopefully makes a couple of things easier to read. Also, this rearrages the order in this branch so that the overall diff against the trunk will hopefully be a bit cleaner.
* handle renames in status computationEdward Thomson2013-06-171-7/+14
|
* status access by index, providing more details to callersEdward Thomson2013-06-172-0/+66
|
* Merge pull request #1642 from arrbee/diff-function-contextVicent Martí2013-06-121-2/+48
|\ | | | | Diff code reorg plus function context in diff headers
| * Add patch from blobs APIRussell Belfer2013-06-121-2/+45
| | | | | | | | | | | | | | | | This adds two new public APIs: git_diff_patch_from_blobs and git_diff_patch_from_blob_and_buffer, plus it refactors the code for git_diff_blobs and git_diff_blob_to_buffer so that they code is almost entirely shared between these APIs, and adds tests for the new APIs.
| * Implement regex pattern diff driverRussell Belfer2013-06-111-0/+3
| | | | | | | | | | | | | | This implements the loading of regular expression pattern lists for diff drivers that search for function context in that way. This also changes the way that diff drivers update options and interface with xdiff APIs to make them a little more flexible.
* | Add high(est) config level for application specific config filesSven Strickroth2013-06-111-0/+4
|/ | | | | | Some tools use an extra level to maintain an application specific config files on top of the normal ones. Revision 16adc9fade52b49e2bc13cb52407cc0025a93c8b broke this. Signed-off-by: Sven Strickroth <email@cs-ware.de>
* Merge pull request #1624 from libgit2/vmg/full-ref-iteratorVicent Martí2013-06-032-43/+49
|\ | | | | Breaking RefDB changes
| * ...Aaaand this worksVicent Marti2013-05-302-8/+8
| |
| * What are the chances, reallyVicent Marti2013-05-292-30/+31
| |
| * Liike thisVicent Marti2013-05-282-6/+11
| |
* | Merge pull request #1621 from NHDaly/clone_transport_flagsVicent Martí2013-05-311-0/+3
|\ \ | | | | | | Added support for setting transport flags (No check SSL cert) to git_clo...
| * | Added support for setting transport flags (No check SSL cert) to git_clone call.Nathan Daly2013-05-311-0/+3
| | |
* | | Merge pull request #1559 from carlosmn/ref-shorthandVicent Martí2013-05-311-0/+15
|\ \ \ | | | | | | | | Introduce git_reference_shorthand
| * | | Introduce git_reference_shorthandCarlos Martín Nieto2013-05-081-0/+15
| | | | | | | | | | | | | | | | Generate a shorthand name out of the full refname.
* | | | Proposal to handle default value (auto = 0)yorah2013-05-301-4/+3
| |/ / |/| |
* | | Fix two typos in the merge docs.Arthur Schreiber2013-05-291-2/+2
| |/ |/|
* | packbuilder: also write index in git_packbuilder_writeMichael Schubert2013-05-271-3/+9
| | | | | | | | | | | | git_packbuilder_write() used to write a packfile to the passed file path. Instead, ask for a destination directory and create both the packfile and an index, as most users probably do expect.
* | Fix documentation of git_branch_delete.Daniel Rodríguez Troitiño2013-05-261-1/+2
| | | | | | | | The reference should be freed by the user, not the library.
* | Clarify GIT_DIFF_INCLUDE_UNTRACKED_CONTENT optionRussell Belfer2013-05-241-5/+10
| | | | | | | | | | | | | | | | This improves the docs for GIT_DIFF_INCLUDE_UNTRACKED_CONTENT as well as the other flags related to UNTRACKED items in diff, plus it makes that flag now automatically turn on GIT_DIFF_INCLUDE_UNTRACKED which seems like a reasonable dwim type of change.
* | Typedef git_config_level_t and use it everywhereRussell Belfer2013-05-242-13/+28
| | | | | | | | | | | | | | | | The GIT_CONFIG_LEVEL constants actually work well as an enum because they are mutually exclusive, so this adds a typedef to the enum and uses that everywhere that one of these constants are expected, instead of the old code that typically used an unsigned int.
* | Docs for git_libgit2_opts and cache disable tweakRussell Belfer2013-05-241-2/+31
| | | | | | | | | | | | | | This adds docs for the cache control options to git_libgit2_opts and also tweaks the cache code so that if the cache is disabled, then the next time we attempt to insert something into the cache in question, we will actually clear any old cached objects.
* | Add typedefs on some public enumsRussell Belfer2013-05-243-10/+11
| | | | | | | | Apparently this makes things easier to bind in some languages.
* | Merge pull request #1593 from ethomson/conflict_iteratorVicent Martí2013-05-242-6/+43
|\ \ | | | | | | introduce git_conflict_iterator
| * | introduce git_conflict_iteratorEdward Thomson2013-05-172-6/+43
| | |
* | | Merge pull request #1592 from ethomson/merge_setupVicent Martí2013-05-242-4/+58
|\ \ \ | | | | | | | | merge setup
| * | | merge setupEdward Thomson2013-05-172-4/+58
| |/ /
* | | Merge pull request #1603 from ben/shallowVicent Martí2013-05-241-0/+9
|\ \ \ | | | | | | | | Shallow-clone detection
| * | | Improve test failure outputBen Straub2013-05-231-0/+9
| | | |
* | | | Merge pull request #1595 from arrbee/even-more-rename-fixesVicent Martí2013-05-242-18/+73
|\ \ \ \ | |/ / / |/| | | Even more rename detection fixes
| * | | More diff rename tests; better split swap handlingRussell Belfer2013-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a couple more tests of different rename scenarios. Also, this fixes a problem with the case where you have two "split" deltas and the left half of one matches the right half of the other. That case was already being handled, but in the wrong order in a way that could result in bad output. Also, if the swap also happened to put the other two halves into the correct place (i.e. two files exchanged places with each other), then the second delta was left with the SPLIT flag set when it really should be cleared.
| * | | Significant rename detection rewriteRussell Belfer2013-05-221-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flips rename detection around so instead of creating a forward mapping from deltas to possible rename targets, instead it creates a reverse mapping, looking at possible targets and trying to find a source that they could have been renamed or copied from. This is important because each output can only have a single source, but a given source could map to multiple outputs (in the form of COPIED records). Additionally, this makes a couple of tweaks to the public rename detection APIs, mostly renaming a couple of options that control the behavior to make more sense and to be more like core Git. I walked through the tests looking at the exact results and updated the expectations based on what I saw. The new code is different from the old because it cannot give some nonsense results (like A was renamed to both B and C) which were part of the outputs previously.
| * | | More git_diff_find_similar improvementsRussell Belfer2013-05-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add new GIT_DIFF_FIND_EXACT_MATCH_ONLY flag to do similarity matching without using the similarity metric (i.e. only compare the SHA). - Clean up the similarity measurement code to more rigorously distinguish between files that are not similar and files that are not comparable (previously, a 0 could either mean that the files could not be compared or that they were totally different) - When splitting a MODIFIED file into a DELETE/ADD pair, actually make a DELETED/UNTRACKED pair if the right side of the diff is from the working directory. This prevents an odd mix of ADDED and UNTRACKED files on workdir diffs.
| * | | Fix issues with git_diff_find_similarRussell Belfer2013-05-171-11/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of bugs in the rename code that only were obvious when I started testing it against large old repos with more complex patterns. (The code to do that testing is not ready to merge with libgit2, but I do plan to add more thorough tests.) This contains a significant number of changes and also tweaks the public API slightly to make emulating core git easier. Most notably, this separates the GIT_DIFF_FIND_AND_BREAK_REWRITES flag into FIND_REWRITES (which adds a self-similarity score to every modified file) and BREAK_REWRITES (which splits the modified deltas into add/remove pairs in the diff list). When you do a raw output of core git, rewrites show up as M090 or such, not at A and D output, so I wanted to be able to emulate that. Publicly, this also changes the flags to be uint16_t since we don't need values out of that range. Internally, this contains significant changes from a number of small bug fixes (like using the wrong side of the diff to decide if the object could be found in the ODB vs the workdir) to larger issues about which files can and should be compared and how the various edge cases of similarity scores should be treated. Honestly, I don't think this is the last update that will have to be made to this code, but I think this moves us closer to correct behavior and I tried to document the code so it would be easier to follow..
| * | | Add git_diff_print_raw printing helperRussell Belfer2013-05-171-0/+16
| | | | | | | | | | | | | | | | Makes it easier to emulate the --raw option
| * | | Add git_oid_nfmt - a flexible OID formatterRussell Belfer2013-05-171-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | I frequently want to the the first N digits of an OID formatted as a string and I'd like it to be efficient. This function makes that easy and I could rewrite the OID formatters in terms of it.
* | | | Merge pull request #1594 from nulltoken/topic/tag_annotationBen Straub2013-05-211-0/+31
|\ \ \ \ | | | | | | | | | | tag: Introduce git_tag_annotation_create()
| * | | | tag: Introduce git_tag_annotation_create()nulltoken2013-05-211-0/+31
| | |/ / | |/| |
* | | | Merge pull request #1597 from zodiac/patch-1Ben Straub2013-05-211-1/+1
|\ \ \ \ | | | | | | | | | | define "long name" in git_reference_name_to_id
| * | | | define "long name" in git_reference_name_to_idLi Xuanji2013-05-211-1/+1
| |/ / /
* | | | refs: export the glob iteratorCarlos Martín Nieto2013-05-211-0/+11
|/ / /
* | | revparse: Introduce git_revparse_ext()nulltoken2013-05-161-0/+22
| | | | | | | | | | | | | | | | | | Expose a way to retrieve, along with the target git_object, the reference pointed at by some revparse expression (`@{<-n>}` or `<branchname>@{upstream}` syntax).
* | | Merge pull request #1558 from bmorganpa/ssh_transportVicent Martí2013-05-161-0/+74
|\ \ \ | |/ / |/| | SSH Transport