include


Log

Author Commit Date CI Message
Andy Lindeman 51b0397a 2013-07-15T23:40:57 Small grammar fix in docs
Etienne Samson 85e1eded 2013-07-15T16:31:25 Add `git_remote_owner`
Andy Lindeman 960431c3 2013-07-14T17:26:24 Fixes return type documentation
Russell Belfer d70ce9bd 2013-07-10T15:38:57 Clarify docs for git_status_file
Russell Belfer f9775a37 2013-06-29T23:22:31 Add ignore_submodules to diff options This adds correct support for an equivalent to --ignore-submodules in diff, where an actual ignore value can be passed to diff to override the per submodule settings in the configuration. This required tweaking the constants for ignore values so that zero would not be used and could represent an unset option to the diff. This was an opportunity to move the submodule values into include/git2/types.h and to rename the poorly named DEFAULT values for ignore and update constants to RESET instead. Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL (which is actually a minor change from the old behavior in that submodules will now be treated as UNMODIFIED deltas instead of being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED). This includes tests for the various new settings.
Russell Belfer 1aad6137 2013-06-29T13:16:33 Submodule status improvements This fixes the way that submodule status is checked to bypass just about all of the caching in the submodule object. Based on the ignore value, it will try to do the minimum work necessary to find the current status of the submodule - but it will actually go to disk to get all of the current values. This also removes the custom refcounting stuff in favor of the common git_refcount style. Right now, it is still for internal purposes only, but it should make it easier to add true submodule refcounting in the future with a public git_submodule_free call that will allow bindings not to worry about the submodule object getting freed from underneath them.
Russell Belfer 3fe046cf 2013-06-29T13:13:38 Add BARE option to git_repository_open_ext This adds a BARE option to git_repository_open_ext which allows a fast open path that still knows how to read gitlinks and to search for the actual .git directory from a subdirectory. `git_repository_open_bare` is still simpler and faster, but having a gitlink aware fast open is very useful for submodules where we want to quickly be able to peek at the HEAD and index data without doing any other meaningful repo operations.
Russell Belfer 41f1f9d7 2013-06-27T16:52:00 Add API to get path to index file
Russell Belfer 2b672d5b 2013-07-08T22:46:36 Add git_pathspec_match_diff API This adds an additional pathspec API that will match a pathspec against a diff object. This is convenient if you want to handle renames (so you need the whole diff and can't use the pathspec constraint built into the diff API) but still want to tell if the diff had any files that matched the pathspec. When the pathspec is matched against a diff, instead of keeping a list of filenames that matched, instead the API keeps the list of git_diff_deltas that matched and they can be retrieved via a new API git_pathspec_match_list_diff_entry. There are a couple of other minor API extensions here that were mostly for the sake of convenience and to reduce dependencies on knowing the internal data structure between files inside the library.
Russell Belfer 3e96ecf2 2013-07-08T09:53:24 Improve include/git2/pathspec.h docs
Russell Belfer a8b5f116 2013-07-03T17:00:50 Fix example/log.c pathspec handling of merges This fixes the way the example log program decides if a merge commit should be shown when a pathspec is given. Also makes it easier to use the pathspec API to just check "does a tree match anything in the pathspec" without allocating a match list.
Russell Belfer f094f905 2013-07-01T15:41:01 Add raw header access to commit API
Russell Belfer d2ce27dd 2013-06-24T23:16:06 Add public API for pathspec matching This adds a new public API for compiling pathspecs and matching them against the working directory, the index, or a tree from the repository. This also reworks the pathspec internals to allow the sharing of code between the existing internal usage of pathspec matching and the new external API. While this is working and the new API is ready for discussion, I think there is still an incorrect behavior in which patterns are always matched against the full path of an entry without taking the subdirectories into account (so "s*" will match "subdir/file" even though it wouldn't with core Git). Further enhancements are coming, but this was a good place to take a functional snapshot.
Vicent Martí b8cd7aa9 2013-07-09T17:20:55 Merge pull request #1704 from arrbee/kill-status-index-then-workdir Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option
Vicent Martí 77fa06f3 2013-07-09T17:20:36 Merge pull request #1695 from arrbee/fix-1695 API should not be ifdeffed
Russell Belfer 290e1479 2013-07-09T16:17:41 Add GIT_CAP_SSH if library was built with SSH This also adds a test that actually calls git_libgit2_capabilities and git_libgit2_version.
Russell Belfer a3c062db 2013-07-09T09:58:33 Make SSH APIs present even without SSH support The SSH APIs will just return an error code and state that the library was built without SSH support if they are called in that case.
Etienne Samson 2274993b 2013-07-09T12:52:25 Make the git_signature const in the stash API.
Russell Belfer 2a16914c 2013-07-03T12:20:34 Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option This option serves no benefit now that the git_status_list API is available. It was of questionable value before and now it would just be a bad idea to use it rather than the indexed API.
Andrej Mitrovic f8ccd6c9 2013-07-02T20:23:54 Fix small typo in docs for git_repository_message.
Andrej Mitrovic 0b170f4d 2013-07-01T00:56:54 Fix docs to use proper enum names that exist.
Vicent Marti eddc1f1e 2013-06-25T00:14:45 libgit2 v0.19.0 "gut merge" 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.
Andreas Linde e1967164 2013-06-24T15:33:41 Fixed most documentation header bugs 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
Russell Belfer 9094ae5a 2013-06-21T11:51:16 Add target directory to checkout 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
Russell Belfer 36fd9e30 2013-06-21T11:20:54 Fix checkout of modified file when missing from wd 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.
Russell Belfer 22b6b82f 2013-06-20T12:16:06 Add status flags to force output sort order 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.
Russell Belfer f30fff45 2013-06-19T15:27:25 Add index pathspec-based operations 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.
Russell Belfer 74ded024 2013-06-17T17:03:34 Add "as_path" parameters to blob and buffer diffs 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.
Russell Belfer 4e28e638 2013-06-13T15:27:30 Clarify some docs and minor reordering 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.
Edward Thomson dfe8c8df 2013-05-22T23:19:40 handle renames in status computation
Edward Thomson 1ee2ef87 2013-05-21T11:05:21 status access by index, providing more details to callers
Vicent Martí 93da7af7 2013-06-12T14:52:47 Merge pull request #1642 from arrbee/diff-function-context Diff code reorg plus function context in diff headers
Russell Belfer f9c824c5 2013-06-12T11:55:27 Add patch from blobs API 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.
Sven Strickroth 76b893b6 2013-06-11T21:33:18 Add high(est) config level for application specific config files 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>
Russell Belfer 5dc98298 2013-06-11T11:22:22 Implement regex pattern diff driver 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.
Vicent Martí 947fad4f 2013-06-03T09:28:58 Merge pull request #1624 from libgit2/vmg/full-ref-iterator Breaking RefDB changes
Vicent Martí 8d863aa2 2013-05-31T06:01:59 Merge pull request #1621 from NHDaly/clone_transport_flags Added support for setting transport flags (No check SSL cert) to git_clo...
Nathan Daly 88392914 2013-05-30T01:12:27 Added support for setting transport flags (No check SSL cert) to git_clone call.
Vicent Martí 9afc5971 2013-05-31T03:09:38 Merge pull request #1559 from carlosmn/ref-shorthand Introduce git_reference_shorthand
yorah df50512a 2013-05-30T18:06:54 Proposal to handle default value (auto = 0)
Vicent Marti 4e6e2ff2 2013-05-30T03:47:10 ...Aaaand this works
Vicent Marti ec24e542 2013-05-29T22:47:37 What are the chances, really
Arthur Schreiber 31a61181 2013-05-29T00:02:26 Fix two typos in the merge docs.
Vicent Marti 56960b83 2013-05-28T20:47:55 Liike this
Michael Schubert 563c19a9 2013-05-11T11:36:29 packbuilder: also write index in git_packbuilder_write 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.
Daniel Rodríguez Troitiño f8bd730c 2013-05-26T17:29:00 Fix documentation of git_branch_delete. The reference should be freed by the user, not the library.
Russell Belfer d20b0449 2013-05-24T10:37:40 Clarify GIT_DIFF_INCLUDE_UNTRACKED_CONTENT option 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.
Russell Belfer 16adc9fa 2013-05-24T10:35:58 Typedef git_config_level_t and use it everywhere 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.
Russell Belfer 2e62e7c2 2013-05-24T10:33:41 Docs for git_libgit2_opts and cache disable tweak 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.
Russell Belfer 0f1f9833 2013-05-24T10:32:07 Add typedefs on some public enums Apparently this makes things easier to bind in some languages.
Vicent Martí 26ab6284 2013-05-24T03:30:35 Merge pull request #1593 from ethomson/conflict_iterator introduce git_conflict_iterator
Vicent Martí f7ceef06 2013-05-24T03:24:27 Merge pull request #1592 from ethomson/merge_setup merge setup
Vicent Martí 4811c150 2013-05-24T01:14:52 Merge pull request #1603 from ben/shallow Shallow-clone detection
Vicent Martí 30caf0cf 2013-05-24T01:13:48 Merge pull request #1595 from arrbee/even-more-rename-fixes Even more rename detection fixes
Ben Straub 93d8f77f 2013-05-23T15:11:53 Improve test failure output
Russell Belfer 67db583d 2013-05-23T15:06:07 More diff rename tests; better split swap handling 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.
Russell Belfer a21cbb12 2013-05-22T10:37:12 Significant rename detection rewrite 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.
Ben Straub 6828bf26 2013-05-21T10:49:36 Merge pull request #1594 from nulltoken/topic/tag_annotation tag: Introduce git_tag_annotation_create()
nulltoken b81cc1d6 2013-05-18T16:52:16 tag: Introduce git_tag_annotation_create()
Ben Straub e167ec18 2013-05-21T08:09:17 Merge pull request #1597 from zodiac/patch-1 define "long name" in git_reference_name_to_id
Carlos Martín Nieto fc74343f 2013-05-21T16:51:50 refs: export the glob iterator
Li Xuanji e069478e 2013-05-21T21:35:58 define "long name" in git_reference_name_to_id
Russell Belfer 9be5be47 2013-05-20T13:37:21 More git_diff_find_similar improvements - 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.
Russell Belfer d958e37a 2013-05-17T17:21:45 Fix issues with git_diff_find_similar 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..
Russell Belfer aadfa85b 2013-05-17T16:41:15 Add git_diff_print_raw printing helper Makes it easier to emulate the --raw option
Russell Belfer 660d59ca 2013-05-17T16:40:00 Add git_oid_nfmt - a flexible OID formatter 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.
Edward Thomson 0e0108f7 2013-05-17T15:59:57 introduce git_conflict_iterator
Edward Thomson 9c06b250 2013-05-16T13:04:37 merge setup
nulltoken e841c533 2013-05-09T16:42:39 revparse: Introduce git_revparse_ext() Expose a way to retrieve, along with the target git_object, the reference pointed at by some revparse expression (`@{<-n>}` or `<branchname>@{upstream}` syntax).
Vicent Martí e3107e0e 2013-05-16T11:35:02 Merge pull request #1558 from bmorganpa/ssh_transport SSH Transport
Russell Belfer 58206c9a 2013-05-16T10:38:27 Add cat-file example and increase const use in API This adds an example implementation that emulates git cat-file. It is a convenient and relatively simple example of getting data out of a repository. Implementing this also revealed that there are a number of APIs that are still not using const pointers to objects that really ought to be. The main cause of this is that `git_vector_bsearch` may need to call `git_vector_sort` before doing the search, so a const pointer to the vector is not allowed. However, for tree objects, with a little care, we can ensure that the vector of tree entries is always sorted and allow lookups to take a const pointer. Also, the missing const in commit objects just looks like an oversight.
Russell Belfer 89251b28 2013-05-15T16:25:11 Update index.h docs Move the git_index_entry to the very top, since it provides the main structure that needs to be understood by the reader, then move the bitmasks for the flags and the flags_extended under that since they are details for looking at particular fields of the structure.
Russell Belfer 96c01991 2013-05-15T09:24:51 Remove entry dup/free functions and fix comments This removes the functions to duplicate and free copies of a git_index_entry and updates the comments to explain that you should just use the public definition of the struct as needed.
Russell Belfer 797dfb28 2013-05-13T16:09:33 Add APIs to dup and free git_index_entrys This adds git_index_entry_dup to make a copy of an existing entry and git_index_entry_free to release the memory of the copy. It also updates the documentation for git_index_get_bypath and git_index_get_byindex to make it clear that the returned structure should *not* be modified.
Russell Belfer 487884a9 2013-05-13T16:07:29 Improve docs for git_index_entry flag masks The constants for extracting data from git_index_entry flags and flags_extended are not named in a way that makes it easy to know where to use each one. This improves the docs for the flags (and slightly reorganizes them), so it should be more obvious.
Vicent Martí 71596200 2013-05-15T15:47:46 Merge pull request #1588 from arrbee/fixes-for-checkout-and-diff Bug fixes for checkout and diff
Russell Belfer dcb0f7c0 2013-05-15T14:54:02 Fix checkout of submodules with no .gitmodules It is possible for there to be a submodule in a repository with no .gitmodules file (for example, if the user forgot to commit the .gitmodules file). In this case, core Git will just create an empty directory as a placeholder for the submodule but otherwise ignore it. We were generating an error and stopping the checkout. This makes our behavior match that of core git.
nulltoken 1fed6b07 2013-05-13T21:57:37 Fix trailing whitespaces
Linquize 0cb16fe9 2013-05-15T20:26:55 Unify whitespaces to tabs
Edward Thomson b6cc559a 2013-05-11T02:42:49 Merge pull request #1385 from carlosmn/refs-iter Introduce a refs iterator
Carlos Martín Nieto c58cac12 2013-05-04T18:06:14 Introduce a glob-filtering iterator If the backend doesn't provide support for it, the matching is done in refdb on top of a normal iterator.
Carlos Martín Nieto 2b562c3a 2013-05-04T16:32:58 refs: remove the OID/SYMBOLIC filtering Nobody should ever be using anything other than ALL at this level, so remove the option altogether. As part of this, git_reference_foreach_glob is now implemented in the frontend using an iterator. Backends will later regain the ability of doing the glob filtering in the backend.
Carlos Martín Nieto 4def7035 2013-03-02T19:31:03 refs: introduce an iterator This allows us to get a list of reference names in a loop instead of callbacks.
Brad Morgan 89ea0e51 2013-05-10T09:40:14 Removed ifdef
Brad Morgan b4d81a00 2013-05-09T17:40:21 Moved libssh2 sign callback into typedef
Russell Belfer 3d1c9f61 2013-05-09T06:45:06 Fix git_repository_message docs This clarifies the docs for git_repository_message and also adds to the tests to explicitly check NUL termination of data when the output buffer is smaller than the message size. There is a minor behavior change so that a non-NULL output buffer will always be NUL terminated (at length zero) if an error occurs.
Vicent Martí 503dd0f3 2013-05-09T05:43:25 Merge pull request #1560 from carlosmn/ref-dwim Expose git_reference_dwim
Carlos Martín Nieto 4f2eb2b7 2013-05-08T02:28:47 Introduce git_reference_shorthand Generate a shorthand name out of the full refname.
Vicent Martí af795759 2013-05-07T15:09:11 Merge pull request #1552 from carlosmn/config-helpers Config helpers for global/xdg config files
Carlos Martín Nieto 98d633cc 2013-05-07T23:28:21 Expose git_reference_dwim Extract this function out of the rev-parse code to be able to DWIM a reference instead of its target.
Carlos Martín Nieto 5d831887 2013-05-07T00:10:02 config: convenience function to open global/xdg The rules for which one to open is a bit silly, so let's make it easier for our users.
Brad Morgan 4ca3d6d2 2013-05-07T14:37:15 Added ifdef
Brad Morgan 00e43380 2013-05-07T14:30:35 Merge remote-tracking branch 'origin/development' into ssh_transport
Brad Morgan 574b86b7 2013-05-07T13:53:23 Fixed compilation issues when libssh2 is missing
Brad Morgan c36565c0 2013-05-07T13:43:10 Added SSH public key authentication
Vicent Martí 33665410 2013-05-07T08:00:44 Merge pull request #1556 from arrbee/diff-patch-fixes Diff patch bug fixes
Russell Belfer d63eec69 2013-05-07T04:44:08 Improve diff function docs
Russell Belfer e35e2684 2013-05-07T04:32:17 Add GIT_DIFF_LINE_CONTEXT_EOFNL This adds a new line origin constant for the special line that is used when both files end without a newline. In the course of writing the tests for this, I was having problems with modifying a file but not having diff notice because it was the same size and modified less than one second from the start of the test, so I decided to start working on nanosecond timestamp support. This commit doesn't contain the nanosecond support, but it contains the reorganization of maybe_modified and the hooks so that if the nanosecond data were being read by stat() (or rather being copied by git_index_entry__init_from_stat), then the nsec would be taken into account. This new stuff could probably use some more tests, although there is some amount of it here.
J. David Ibáñez 6e865996 2013-05-07T07:33:35 Add git_commit_owner to the public interface Just like git_tree_owner, etc.
Vicent Martí 450a78bf 2013-05-06T06:33:02 Merge pull request #1545 from ethomson/checkout_dirs_in_use allow checkout to proceed when a dir to be removed is in use (win32)