include/git2


Log

Author Commit Date CI Message
Carlos Martín Nieto 6a0d2b43 2014-08-27T15:09:07 Merge remote-tracking branch 'upstream/master' into cmn/ssh-retry
Vicent Marti d28b2b7a 2014-08-18T15:18:59 Merge pull request #2528 from libgit2/vmg/tostr_s Export `git_oid_tostr_s` instead of `_allocfmt`
Vicent Marti 4ca0b566 2014-08-18T12:41:06 oid: Export `git_oid_tostr_s` instead of `_allocfmt` The old `allocfmt` is of no use to callers, as they are not able to free the returned buffer. Export a new API that returns a static string that doesn't need to be freed.
Edward Thomson c180c065 2014-07-09T17:58:39 Custom transport: minor cleanups * Move the transport registration mechanisms into a new header under 'sys/' because this is advanced stuff. * Remove the 'priority' argument from the registration as it adds unnecessary complexity. (Since transports cannot decline to operate, only the highest priority transport is ever executed.) Users who require per-priority transports can implement that in their custom transport themselves. * Simplify registration further by taking a scheme (eg "http") instead of a prefix (eg "http://").
Vicent Marti 243db06c 2014-07-23T07:57:20 Merge pull request #2484 from libgit2/fix-git-status-list-new-unreadable-folder Fix git status list new unreadable folder
Edward Thomson 0ba4dca5 2014-07-22T10:40:23 git_cherry_pick -> git_cherrypick
Alan Rogers 7d0ab0fa 2014-07-22T15:08:24 Merge remote-tracking branch 'origin/master' into fix-git-status-list-new-unreadable-folder
Alan Rogers 35b1471f 2014-07-22T11:15:33 Move the UNREADABLE enums to the correct group.
joshaber b3af2d80 2014-07-16T13:34:25 Just put it all in buffer.
joshaber df4cba0f 2014-07-15T17:27:58 Export git_buf_text_is_binary and git_buf_text_contains_nul. So that users don’t need to implement binary detection themselves.
Vicent Marti 44cfb6f3 2014-07-11T16:49:23 Merge pull request #2463 from libgit2/cmn/ssh-factory-for-paths ssh: provide a factory function for setting ssh paths
Carlos Martín Nieto eb5f0346 2014-07-11T12:22:48 checkout: fix docs formatting for the options
Alan Rogers 4edd1a03 2014-07-10T19:17:34 Merge remote-tracking branch 'origin/development' into fix-git-status-list-new-unreadable-folder
Carlos Martín Nieto 18eb6ec8 2014-07-08T09:56:16 Documentation fixes Fixup git_attr_value's comment to be recognised as documentation, and include the definitions needed for clang to parse reset.h such that it shows up in the documentation. This fixes #2430.
Carlos Martín Nieto d4256ed5 2014-07-04T10:00:39 ssh: provide a factory function for setting ssh paths git allows you to set which paths to use for the git server programs when connecting over ssh; and we want to provide something similar. We do this by providing a factory function which can be set as the remote's transport callback which will set the given paths upon creation.
Jacques Germishuys 268dafa2 2014-07-03T20:19:16 Fix git_cred_ssh_interactive_callback signature
Vicent Marti cb6e68c7 2014-07-02T16:45:02 Merge pull request #2449 from libgit2/cmn/maint-21 Maint fixes for ssl initing and ssh exposure
Carlos Martín Nieto 6812afaf 2014-06-30T21:36:38 clone: remote git_clone_into{,_local} from the public API As git_clone now has callbacks to configure the details of the repository and remote, remove the lower-level functions from the public API, as they lack some of the logic from git_clone proper.
Carlos Martín Nieto d58a64e9 2014-06-30T20:55:32 clone: add a callback for repository creation Analogously to the remote creation callback, provide a way for the user of git_clone() to create the repository with whichever options they desire via callback.
Carlos Martín Nieto 00b8c216 2014-06-30T23:18:37 ssh: always declare the libssh2 types This lets a user decide they do want to use keyboard-interactive after they've compiled.
Carlos Martín Nieto eac63e67 2014-06-30T10:03:36 ssh: create the right callback signature based on build options When linking against libssh2, create the transport.h such that it contains its definition for custom crypto and keyboard-interactive callbacks. If we don't link against libssh2, create an equivalent signature which has void pointers instead of pointers to libssh2 structures. This would be one way to fix #2438.
Philip Kelley 1697cd6f 2014-06-25T13:20:27 Improvements to git_transport extensibility git_remote_set_transport now takes a transport factory rather than a transport git_clone_options now allows the caller to specify a remote creation callback
Carlos Martín Nieto d1c281a5 2014-06-25T16:24:26 cred: add convenience function to get the username Since each cred defines the username on their own, introduce git_cred__username to retrieve the username pointer from them.
Carlos Martín Nieto 54da6958 2014-06-25T15:41:01 cred: introduce username-only cred This exists as ssh needs to know about the username to use before it can query for the supported authentication methods.
Carlos Martín Nieto 8873728f 2014-06-16T19:10:04 Introduce GIT_EAUTH Introduce this error code to signal an authentication failure.
Edward Thomson 4e813a8b 2014-06-25T09:11:07 Export git_revert_commit
Carlos Martín Nieto 5e37874d 2014-06-24T17:51:45 Merge remote-tracking branch 'upstream/cmn/treebuilder-perf'
Carlos Martín Nieto 76f76162 2014-06-11T21:14:45 remote: update documentation Add docs for git_clone_local_t and move the docs for the git_clone_options to each field.
Carlos Martín Nieto 978fbb4c 2014-06-09T22:45:23 treebuilder: don't keep removed entries around If the user wants to keep a copy for themselves, they should make a copy. It adds unnecessary complexity to make sure the returned entries are valid until the builder is cleared.
Carlos Martín Nieto 4d3f1f97 2014-06-09T04:38:22 treebuilder: use a map instead of vector to store the entries Finding a filename in a vector means we need to resort it every time we want to read from it, which includes every time we want to write to it as well, as we want to find duplicate keys. A hash-map fits what we want to do much more accurately, as we do not care about sorting, but just the particular filename. We still keep removed entries around, as the interface let you assume they were going to be around until the treebuilder is cleared or freed, but in this case that involves an append to a vector in the filter case, which can now fail. The only time we care about sorting is when we write out the tree, so let's make that the only time we do any sorting.
Carlos Martín Nieto 17fbf852 2014-06-10T03:53:26 pathspec: use C guards in header
Carlos Martín Nieto 281da004 2014-06-09T19:35:41 remote: fix rename docs
Carlos Martín Nieto 4fb32a44 2014-06-08T20:01:02 Bump version to 0.21.0 Bump library version to 0.21.0 and SONAME to 21
Carlos Martín Nieto 99807672 2014-06-08T19:42:54 Change SOVERSION at API breaks Since the SOVERSION doesn't need to follow the library's version and simply needs to be monotonically increasing whenever we release something that breaks the ABI, we can set some number and allow multiple versions of the library to be installed side-by-side. We start here with the minor version as that's what we release for now, and it allows to backport this change to earlier versions.
Carlos Martín Nieto 231f350d 2014-06-06T22:55:34 remote: don't free the remote on delete This was a bad idea. Don't free except in the free function.
Carlos Martín Nieto 72bca13e 2014-06-06T16:33:54 remote: return problem refspecs instead of using a callback There is no reason why we need to use a callback here. A string array fits better with the usage, as this is not an event and we don't need anything from the user.
Alan Rogers 9e2d2f30 2014-06-04T15:41:48 Whitespace wibbles.
Alan Rogers dc49e1b5 2014-06-04T15:36:28 Merge remote-tracking branch 'origin/development' into fix-git-status-list-new-unreadable-folder Conflicts: include/git2/diff.h
Alan Rogers 7b491a7d 2014-06-03T17:50:00 GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED
Alan Rogers 79d5b5c9 2014-06-03T17:42:52 Add GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED and a (failing) test for it.
Carlos Martín Nieto dedfc734 2014-06-02T19:21:24 index: split GIT_IDXENTRY into two flag enums The documentation has shown this as a single enum for a long time. These should in fact be two enums. One with the bits for the flags and another with the bits for the extended flags.
Carlos Martín Nieto 11e2665e 2014-06-02T18:53:32 Formatting fixes for the docs These are some issues I found while playing around with the new parser for docurium.
Alan Rogers 66271925 2014-05-30T16:21:49 Add GIT_STATUS_OPT_INCLUDE_UNREADABLE
Alan Rogers a777fc37 2014-05-30T16:21:13 Remove GIT_FILEMODE_NEW as it's unused. And use 0 for GIT_FILEMODE_UNREADABLE.
Vicent Marti 31c55152 2014-05-29T14:50:57 Merge pull request #2011 from libgit2/cmn/clone-local Local clone
Ungureanu Marius fda73bc5 2014-05-28T22:57:21 [Blob] Update documentation for is_binary. filter.h tells me that we check the first 8000 bytes.
Carlos Martín Nieto 2614819c 2014-05-28T11:28:57 clone: allow for linking in local clone If requested, git_clone_local_into() will try to link the object files instead of copying them. This only works on non-Windows (since it doesn't have this) when both are on the same filesystem (which are unix semantics).
Carlos Martín Nieto c1dbfcbb 2014-05-28T10:07:23 clone: add flag not to link
Carlos Martín Nieto 121b2673 2013-12-23T11:12:31 clone: add flags to override whether to perform a local clone
Carlos Martín Nieto 4386d80b 2013-12-21T17:18:21 clone: perform a "local clone" when given a local path When git is given such a path, it will perform a "local clone", bypassing the git-aware protocol and simply copying over all objects that exist in the source. Copy this behaviour when given a local path.
Edward Thomson eff531e1 2014-05-27T20:58:20 Modify GIT_MERGE_CONFIG -> GIT_MERGE_PREFERENCE
Edward Thomson a3622ba6 2014-05-16T13:54:40 Move GIT_MERGE_CONFIG_* to its own enum
Edward Thomson d362093f 2014-05-08T15:41:36 Introduce GIT_MERGE_CONFIG_* for merge.ff settings git_merge_analysis will now return GIT_MERGE_CONFIG_NO_FASTFORWARD when merge.ff=false and GIT_MERGE_CONFIG_FASTFORWARD_ONLY when merge.ff=true
Michael Anderson 31b0cb51 2014-05-22T17:16:21 Fixed miscellaneous documentation errors.
Alan Rogers 7c4bbbf4 2014-05-23T00:27:34 Try a value for UNREADABLE that won't get masked out?!
Alan Rogers 86c9d3da 2014-05-21T22:54:34 Return GIT_FILEMODE_UNREADABLE for files that fail to stat.
Carlos Martín Nieto d22db24f 2014-05-21T09:32:35 remote: add api to guess the remote's default branch If the remote supports the symref protocol extension, then we return that, otherwise we guess with git's rules.
Carlos Martín Nieto 306475eb 2014-05-20T09:55:26 remote: expose the remote's symref mappings Add a symref_target field to git_remote_head to expose the symref mappings to the user.
Alan Rogers 61bef72d 2014-05-20T23:57:40 Start adding GIT_DELTA_UNREADABLE and GIT_STATUS_WT_UNREADABLE.
Alan Rogers 90553479 2014-05-20T17:40:28 Rename GIT_ENOACCESS -> GIT_EUNREADABLE
Carlos Martín Nieto 49e369b2 2014-05-18T10:06:49 message: don't assume the comment char The comment char is configurable and we need to provide a way for the user to specify which comment char they chose for their message.
Vicent Marti 228272ef 2014-05-16T11:56:37 Merge pull request #2313 from libgit2/cmn/remote-delete Remote deletion
Alan Rogers 158c8ba1 2014-05-15T16:54:46 Return a specific error for EACCES.
Russell Belfer b1914c36 2014-05-12T10:24:46 Minor fixes for warnings and error propagation
Russell Belfer d2c4d1c6 2014-05-12T10:04:52 Merge pull request #2188 from libgit2/cmn/config-snapshot Configuration snapshotting
Russell Belfer 45c53eb6 2014-05-08T10:46:04 Use unsigned type for APIs with opt flag mask
Carlos Martín Nieto ac99d86b 2014-05-07T11:34:32 repository: introduce a convenience config snapshot method Accessing the repository's config and immediately taking a snapshot of it is a common operation, so let's provide a convenience function for it.
Russell Belfer 5269008c 2014-05-06T16:01:49 Add filter options and ALLOW_UNSAFE Diff and status do not want core.safecrlf to actually raise an error regardless of the setting, so this extends the filter API with an additional options flags parameter and adds a flag so that filters can be applied with GIT_FILTER_OPT_ALLOW_UNSAFE, indicating that unsafe filter application should be downgraded from a failure to a warning.
Russell Belfer d2c16e9a 2014-05-02T15:15:43 Doc fixes
Vicent Marti 272b462d 2014-05-02T09:50:15 Merge pull request #2308 from libgit2/rb/diff-update-index-stat-cache Reduce excessive OID calculation for diff and stat
Russell Belfer 9862ef8e 2014-05-02T09:42:07 Merge pull request #2310 from libgit2/cmn/commit-create-safe commit: safer commit creation with reference update
Russell Belfer bc91347b 2014-04-30T11:16:31 Fix remaining init_options inconsistencies There were a couple of "init_opts()" functions a few more cases of structure initialization that I somehow missed.
Russell Belfer 702efc89 2014-04-30T10:57:42 Make init_options fns use unsigned ints and macro Use an unsigned int for the version and add a helper macro so the code is simplified (and so the error message is a common string).
Russell Belfer 9c8ed499 2014-04-29T15:05:58 Remove trace / add git_diff_perfdata struct + api
Russell Belfer 7a2e56a3 2014-04-29T14:30:15 Get rid of redundant git_diff_options_init fn Since git_diff_init_options was introduced, remove this old fn.
Russell Belfer b23b112d 2014-04-29T11:29:49 Add payloads, bitmaps to trace API This is a proposed adjustment to the trace APIs. This makes the trace levels into a bitmask so that they can be selectively enabled and adds a callback-level payload, plus a message-level payload. This makes it easier for me to a GIT_TRACE_PERF callbacks that are simply bypassed if the PERF level is not set.
Russell Belfer cd424ad5 2014-04-28T16:39:53 Add GIT_STATUS_OPT_UPDATE_INDEX and use trace API This adds an option to refresh the stat cache while generating status. It also rips out the GIT_PERF stuff I had an makes use of the trace API to keep statistics about what happens during diff.
Russell Belfer 94fb4aad 2014-04-28T14:48:41 Add diff option to update index stat cache When diff is scanning the working directory, if it finds a file where it is not sure if the index entry matches the working dir, it will recalculate the OID (which is pretty expensive). This adds a new flag to diff so that if the OID calculation finds that the file actually has not changed (i.e. just the modified time was altered or such), then it will refresh the stat cache in the index so that future calls to diff will not have to check the oid again.
Russell Belfer 0fc8e1f6 2014-04-28T14:34:55 Lay groundwork for updating stat cache in diff This reorganized the diff OID calculation to make it easier to correctly update the stat cache during a diff once the flags to do so are enabled. This includes marking the path of a git_index_entry as const so we can make a "fake" git_index_entry with a "const char *" path and not get warnings. I was a little surprised at how unobtrusive this change was, but I think it's probably a good thing.
nulltoken 40e48ea4 2013-11-15T15:36:37 remote: Introduce git_remote_delete()
Carlos Martín Nieto 891b0277 2014-04-30T11:20:51 refs: document _next_name() If it's not documented, it doesn't show up in the docs (and we really should document, anyway).
Carlos Martín Nieto 217c029b 2014-04-09T14:08:22 commit: safer commit creation with reference update The current version of the commit creation and amend function are unsafe to use when passing the update_ref parameter, as they do not check that the reference at the moment of update points to what the user expects. Make sure that we're moving history forward when we ask the library to update the reference for us by checking that the first parent of the new commit is the current value of the reference. We also make sure that the ref we're updating hasn't moved between the read and the write. Similarly, when amending a commit, make sure that the current tip of the branch is the commit we're amending.
Vicent Marti 8443ed6c 2014-04-25T02:10:19 Merge pull request #2284 from jacquesg/push-progress-callback Fire progress and update tips callbacks also for pushes.
Russell Belfer 6b833e3a 2014-04-24T15:40:50 Improve docs for status rename detection limits and make tests empty on platforms without iconv support.
Vicent Marti 212b6205 2014-04-23T09:27:15 Merge pull request #2291 from ethomson/patch_binary patch: emit deflated binary patches (optionally)
Edward Thomson e349ed50 2014-04-22T14:58:33 patch: emit binary patches (optionally)
Russell Belfer 8d09efa2 2014-04-22T12:33:27 Use git_diff_get_stats in example/diff + refactor This takes the `--stat` and related example options in the example diff.c program and converts them to use the `git_diff_get_stats` API which nicely formats stats for you. I went to add bar-graph scaling to the stats formatter and noticed that the `git_diff_stats` structure was holding on to all of the `git_patch` objects. Unfortunately, each of these objects keeps the full text of the diff in memory, so this is very expensive. I ended up modifying `git_diff_stats` to keep just the data that it needs to keep and allowed it to release the patches. Then, I added width scaling to the output on top of that. In making the diff example program match 'git diff' output, I ended up removing an newline from the sumamry output which I then had to compensate for in the email formatting to match the expectations. Lastly, I went through and refactored the tests to use a couple of helper functions and reduce the overall amount of code there.
Russell Belfer 12e422a0 2014-04-21T16:08:05 Some doc and examples/diff.c changes I was playing with "git diff-index" and wanted to be able to emulate that behavior a little more closely with the diff example. Also, I wanted to play with running `git_diff_tree_to_workdir` directly even though core Git doesn't exactly have the equivalent, so I added a command line option for that and tweaked some other things in the example code. This changes a minor output thing in that the "raw" print helper function will no longer add ellipses (...) if the OID is not actually abbreviated.
Carlos Martín Nieto bc0a6198 2014-04-19T15:52:58 transports: allow the creds callback to say it doesn't exist Allow the credentials callback to return GIT_PASSTHROUGH to make the transports code behave as though none was set. This should make it easier for bindings to behave closer to the C code when there is no credentials callback set at their level.
Carlos Martín Nieto 2efd7df6 2014-04-19T15:34:12 remote: provide read access to the callback structure This should make it easier for bindings to dynamically override their own callbacks.
Jacques Germishuys 48e60ae7 2014-04-21T11:23:29 Don't redefine the same callback types, their signatures may change
Jacques Germishuys 98020d3a 2014-04-21T10:55:37 Rename progress callback to sideband_progress
Jacques Germishuys 4f62163e 2014-04-20T22:06:05 Check the return codes of remote callbacks. The user may have requested that the operation be cancelled.
Jacques Germishuys 9effa2fb 2014-04-20T19:19:13 Fire progress callbacks also for pushes. It's not very useful to only know that a pre-receive hook has declined a push, you probably want to know why.
Jacques Germishuys 043112dc 2014-04-18T17:57:39 Replace void * with proper callback types
Jacques Germishuys 8ec0a552 2014-04-18T00:49:07 Make git_cred_ssh_custom_new() naming more consistent
Jacques Germishuys 478408c0 2014-04-17T23:03:44 Introduce git_cred_ssh_interactive_new() This allows for keyboard-interactive based SSH authentication
Carlos Martín Nieto c20d71ea 2014-03-31T10:13:40 config: document the how long the pointers are valid for
Carlos Martín Nieto 523032cd 2014-03-31T09:58:44 config: refresh before reading a value With the isolation of complex reads, we can now try to refresh the on-disk file before reading a value from it. This changes the semantics a bit, as before we could be sure that a string we got from the configuration was valid until we wrote or refreshed. This is no longer the case, as a read can also invalidate the pointer.
Carlos Martín Nieto 55ebd7d3 2014-03-13T17:11:34 config: implement config snapshotting In order to have consistent views of the config files for remotes, submodules et al. and a configuration that represents what is currently stored on-disk, we need a way to provide a view of the configuration that does not change. The goal here is to provide the snapshotting part by creating a read-only copy of the state of the configuration at a particular point in time, which does not change when a repository's main config changes.