summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3131 from urkud/const-charEdward Thomson2015-06-231-1/+1
|\ | | | | Add `const` qualifier
| * Add `const` qualifierYury G. Kudryashov2015-05-151-1/+1
| | | | | | | | | | | | This fixes a warning in `examples/describe.c` without breaking the main build. OTOH, I'm not sure if this is an API-compatible change.
* | commit: allow retrieving an arbitrary header fieldcmn/commit-header-fieldCarlos Martín Nieto2015-06-221-0/+11
| | | | | | | | | | | | This allows the user to look up fields which we don't parse in libgit2, and allows them to access gpgsig or mergetag fields if they wish to check the signature.
* | index: use the checksum to check whether it's been modifiedCarlos Martín Nieto2015-06-191-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | We currently use a timetamp to check whether an index file has been modified since we last read it, but this is racy. If two updates happen in the same second and we read after the first one, we won't detect the second one. Instead read the SHA-1 checksum of the file, which are its last 20 bytes which gives us a sure-fire way to detect whether the file has changed since we last read it. As we're now keeping track of it, expose an accessor to this data.
* | diff: introduce binary diff callbacksEdward Thomson2015-06-121-0/+55
| | | | | | | | | | | | | | Introduce a new binary diff callback to provide the actual binary delta contents to callers. Create this data from the diff contents (instead of directly from the ODB) to support binary diffs including the workdir, not just things coming out of the ODB.
* | Merge pull request #3155 from mgorny/userpass-constCarlos Martín Nieto2015-06-111-2/+2
|\ \ | | | | | | cred_helpers: Add 'const' qualifiers to git_cred_userpass_payload
| * | cred_helpers: Add 'const' qualifiers to git_cred_userpass_payloadMichał Górny2015-05-241-2/+2
| | | | | | | | | | | | | | | | | | Make both username & password in git_cred_userpass_payload 'const'. The values are not altered anywhere, and the extra qualifier allows clients to assign 'const' values there.
* | | Introduce `git_filter_list_contains`Edward Thomson2015-06-101-0/+16
| | | | | | | | | | | | | | | `git_filter_list_contains` can be used to query a filter list to determine if a given filter will be run.
* | | remote: apply insteadOf configuration.Patrick Steinhardt2015-05-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | A remote's URLs are now modified according to the url.*.insteadOf and url.*.pushInsteadOf configurations. This allows a user to replace URL prefixes by setting the corresponding keys. E.g. "url.foo.insteadOf = bar" would replace the prefix "bar" with the new prefix "foo".
* | | Merge pull request #3157 from mgorny/ssh_memory_authCarlos Martín Nieto2015-05-291-0/+24
|\ \ \ | | | | | | | | Support getting SSH keys from memory, pt. 2
| * | | cred: Declare GIT_CREDTYPE_SSH_MEMORY unconditionallyMichał Górny2015-05-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare GIT_CREDTYPE_SSH_MEMORY to have consistent API independently of whether libgit2 was built with or without in-memory key passing support. Or rather, to have it at all since build-time definitions are not stored in headers.
| * | | Return an error when ssh memory credentials are not supported.David Calavera2015-05-271-2/+0
| | | | | | | | | | | | | | | | To not modify the external api.
| * | | Add support to read ssh keys from memory.David Calavera2015-05-271-0/+28
| |/ /
* | | Rename GIT_EMERGECONFLICT to GIT_ECONFLICTEdward Thomson2015-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not error on "merge conflicts"; on the contrary, merge conflicts are a normal part of merging. We only error on "checkout conflicts", where a change exists in the index or the working directory that would otherwise be overwritten by performing the checkout. This *may* happen during merge (after the production of the new index that we're going to checkout) but it could happen during any checkout.
* | | Merge pull request #3139 from ethomson/diff_conflictsCarlos Martín Nieto2015-05-283-11/+24
|\ \ \ | | | | | | | | Include conflicts when diffing
| * | | Introduce `GIT_DIFF_FLAG_EXISTS`Edward Thomson2015-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark the `old_file` and `new_file` sides of a delta with a new bit, `GIT_DIFF_FLAG_EXISTS`, that introduces that a particular side of the delta exists in the diff. This is useful for indicating whether a working directory item exists or not, in the presence of a conflict. Diff users may have previously used DELETED to determine this information.
| * | | introduce `git_index_entry_is_conflict`Edward Thomson2015-05-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not always obvious the mapping between stage level and conflict-ness. More importantly, this can lead otherwise sane people to write constructs like `if (!git_index_entry_stage(entry))`, which (while technically correct) is unreadable. Provide a nice method to help avoid such messy thinking.
| * | | diff/status: introduce conflictsEdward Thomson2015-05-282-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When diffing against an index, return a new `GIT_DELTA_CONFLICTED` delta type for items that are conflicted. For a single file path, only one delta will be produced (despite the fact that there are multiple entries in the index). Index iterators now have the (optional) ability to return conflicts in the index. Prior to this change, they would be omitted, and callers (like diff) would omit conflicted index entries entirely.
| * | | conflicts: when adding conflicts, remove stagedEdward Thomson2015-05-281-1/+2
| |/ / | | | | | | | | | | | | | | | When adding a conflict for some path, remove the staged entry. Otherwise, an illegal index (with both stage 0 and high-stage entries) would result.
* | | Merge pull request #3127 from libgit2/cmn/remote-fixupsCarlos Martín Nieto2015-05-281-32/+6
|\ \ \ | |/ / |/| | Tackle remote API issues from bindings
| * | remote: validate refspecs before adding to configCarlos Martín Nieto2015-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | When we moved from acting on the instance to acting on the configuration, we dropped the validation of the passed refspec, which can lead to writing an invalid refspec to the configuration. Bring that validation back.
| * | remote: remove fetch parameter from create_anonymousCarlos Martín Nieto2015-05-281-10/+4
| | | | | | | | | | | | | | | | | | An anonymous remote is not configured and cannot therefore have configured refspecs. Remove the parameter which adds this from the constructor.
| * | remote: get rid of the run-time refspec settersCarlos Martín Nieto2015-05-171-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | These were left over from the culling as it's not clear which use-cases might benefit from this. It is not clear that we want to support any use-case which depends on changing the remote's idea of the base refspecs rather than passing in different per-operation refspec list, so remove these functions.
* | | Fix error when building as C++.Jason Haslam2015-05-201-1/+1
| | |
* | | Add a missing include for resetCarlos Martín Nieto2015-05-201-0/+1
| | | | | | | | | | | | | | | Our doc parser really wants the types to be declared in the header it's reading.
* | | errors: add GIT_EEOF to indicate early EOFcmn/server-errorsCarlos Martín Nieto2015-05-201-0/+1
|/ / | | | | | | | | | | This can be used by tools to show mesages about failing to communicate with the server. The error message in this case will often contain the server's error message, as far as it managed to send anything.
* | Merge pull request #3118 from libgit2/cmn/stream-sizeEdward Thomson2015-05-133-4/+4
|\ \ | | | | | | odb: make the writestream's size a git_off_t
| * | odb: make the writestream's size a git_off_tcmn/stream-sizeCarlos Martín Nieto2015-05-133-4/+4
| |/ | | | | | | | | | | | | | | | | | | Restricting files to size_t is a silly limitation. The loose backend writes to a file directly, so there is no issue in using 63 bits for the size. We still assume that the header is going to fit in 64 bytes, which does mean quite a bit smaller files due to the run-length encoding, but it's still a much larger size than you would want Git to handle.
* | Merge pull request #3117 from libgit2/cmn/index-more-accurateEdward Thomson2015-05-131-10/+15
|\ \ | | | | | | index: make the entries have more accurate sizes
| * | index: make the entries have more accurate sizescmn/index-more-accurateCarlos Martín Nieto2015-05-121-10/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | While we are confident about the size of an int in architectures we're likely to care about, the index format is defined by the exact size of the fields. Use the definitions which show the exact width of the entry fields. As part of that, bring back 32-bit time and size fields, which currently are 64 bits wide and can bring a false sense of security in how much data they really store. Document that these fields are not to be taken as authoritative.
* | remote: remove git_remote_save()Carlos Martín Nieto2015-05-131-15/+2
| | | | | | | | | | It has now become a no-op, so remove the function and all references to it.
* | remote: remove live changing of refspecsCarlos Martín Nieto2015-05-131-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | The base refspecs changing can be a cause of confusion as to what is the current base refspec set and complicate saving the remote's configuration. Change `git_remote_add_{fetch,push}()` to update the configuration instead of an instance. This finally makes `git_remote_save()` a no-op, it will be removed in a later commit.
* | remote: move the tagopt setting to the fetch optionsCarlos Martín Nieto2015-05-131-18/+45
| | | | | | | | | | This is another option which we should not be keeping in the remote, but is specific to each particular operation.
* | remote: move the update_fetchhead setting to the optionsCarlos Martín Nieto2015-05-131-18/+9
| | | | | | | | | | | | While this will rarely be different from the default, having it in the remote adds yet another setting it has to keep around and can affect its behaviour. Move it to the options.
* | remote: move the transport ctor to the callbacksCarlos Martín Nieto2015-05-134-20/+15
| | | | | | | | | | | | | | Instead of having it set in a different place from every other callback, put it the main structure. This removes some state from the remote and makes it behave more like clone, where the constructors are passed via the options.
* | remote: add prune option to fetchCarlos Martín Nieto2015-05-131-0/+20
| | | | | | | | | | Add a prune setting in the fetch options to allow to fall back to the configuration (the default) or to set it on or off.
* | remote: remove url and pushurl from the save logicCarlos Martín Nieto2015-05-131-10/+14
| | | | | | | | | | | | As a first step in removing the repository-saving logic, don't allow chaning the url or push url from a remote object, but change the configuration on the configuration immediately.
* | Remove the callbacks struct from the remoteCarlos Martín Nieto2015-05-135-203/+195
|/ | | | | | | | | | | | | | Having the setting be different from calling its actions was not a great idea and made for the sake of the wrong convenience. Instead of that, accept either fetch options, push options or the callbacks when dealing with the remote. The fetch options are currently only the callbacks, but more options will be moved from setters and getters on the remote to the options. This does mean passing the same struct along the different functions but the typical use-case will only call git_remote_fetch() or git_remote_push() and so won't notice much difference.
* checkout: better document the `baseline_index` optEdward Thomson2015-05-111-1/+9
|
* stash_apply: provide progress callbacksEdward Thomson2015-05-111-0/+38
|
* stash_apply: provide its own options structureEdward Thomson2015-05-111-17/+50
|
* stash apply: default to at least GIT_CHECKOUT_SAFEEdward Thomson2015-05-111-1/+3
|
* stash: document merge conflictsEdward Thomson2015-05-111-13/+11
|
* stash: refactor to use merge_iteratorsEdward Thomson2015-05-111-6/+6
|
* checkout: allow baseline to be specified as indexEdward Thomson2015-05-111-0/+1
| | | | | | Allow the baseline to be specified as an index, so that users need not write their index to a tree just to checkout with that as the baseline.
* Added git_stash_apply() and git_stash_pop() APIsPierre-Olivier Latour2015-05-111-4/+64
|
* checkout: break case-changes into delete/addEdward Thomson2015-05-041-1/+6
| | | | | | | When checking out with a case-insensitive working directory, we want to change the case of items in the working directory to reflect changes that occured in the checkout target. Diff now has an option to break case-changing renames into delete/add.
* Merge pull request #3059 from libgit2/cmn/negotiation-notifyEdward Thomson2015-05-013-0/+37
|\ | | | | [WIP/RFC] push: report the update plan to the caller
| * push: report the update plan to the callercmn/negotiation-notifyCarlos Martín Nieto2015-04-193-0/+37
| | | | | | | | | | | | | | | | | | It can be useful for the caller to know which update commands will be sent to the server before the packfile is pushed up. git does this via the pre-push hook. We don't have hooks, but as it adds introspection into what is happening, we can add a callback which performs the same function.
* | Update documentation for API changesjamill/doc_updateJameson Miller2015-04-301-1/+2
| |