Commit Graph

1746 Commits

Author SHA1 Message Date
Axel Rasmussen
0269833f92 settings: expose GIT_USE_NSEC flag in git_libgit2_features 2015-09-18 23:33:56 -07:00
Leo Yang
c097f7173d New API: git_index_find_prefix
Find the first index entry matching a prefix.
2015-09-04 12:24:36 -04:00
Carlos Martín Nieto
1cef6b9f19 config: correct documentation for non-existent config file 2015-09-03 11:38:21 +02:00
Carlos Martín Nieto
21e7015ca3 Merge pull request #3402 from ethomson/faster_diff
Provide path matching in the iterators (for faster diffs)
2015-09-01 02:26:11 +02:00
Edward Thomson
53c2296bfe iterator: better document GIT_DIFF_DISABLE_PATHSPEC_MATCH 2015-08-31 19:41:43 -04:00
Edward Thomson
56ed415a24 diff: drop FILELIST_MATCH
Now that non-pathspec matching diffs are implemented at the iterator
level, drop `FILELIST_MATCH`ing.
2015-08-30 19:11:31 -04:00
Carlos Martín Nieto
ed38e26db5 Merge pull request #3401 from phatblat/pb/doc-warning
Escape @ in doc comment
2015-08-30 15:47:49 +02:00
Ben Chatelain
91c9484c23 Escape @ in doc comment 2015-08-29 17:46:34 -06:00
Edward Thomson
3273ab3f0b diff: better document GIT_DIFF_PATHSPEC_DISABLE
Document that `GIT_DIFF_PATHSPEC_DISABLE` is not necessarily about
explicit path matching, but also includes matching of directory
names.  Enforce this in a test.
2015-08-28 20:45:08 -04:00
Edward Thomson
ef206124de Move filelist into the iterator handling itself. 2015-08-28 18:39:52 -04:00
Carlos Martín Nieto
57af0b928e cred: add a free function wrapper 2015-08-19 02:23:18 +02:00
Carlos Martín Nieto
47ed7e5acd transport: provide a way to get the callbacks
libgit2 implementations of smart subtransports can simply reach through
the structure, but external implementors cannot.

Add these two functions as a way for the smart subtransports to get the
callbacks as set by the user.
2015-08-19 02:23:18 +02:00
Carlos Martín Nieto
5340d63d38 config: perform unlocking via git_transaction
This makes the API for commiting or discarding changes the same as for
references.
2015-08-12 04:09:38 +02:00
Carlos Martín Nieto
36f784b538 config: expose locking via the main API
This lock/unlock pair allows for the cller to lock a configuration file
to avoid concurrent operations.

It also allows for a transactional approach to updating a configuration
file. If multiple updates must be made atomically, they can be done
while the config is locked.
2015-08-12 04:09:38 +02:00
Carlos Martín Nieto
b166703964 config: implement basic transactional support
When a configuration file is locked, any updates made to it will be done
to the in-memory copy of the file. This allows for multiple updates to
happen while we hold the lock, preventing races during complex
config-file manipulation.
2015-08-12 04:09:09 +02:00
Michael Procter
25dbcf3499 Make giterr_detach no longer public 2015-08-03 15:23:17 +01:00
Carlos Martín Nieto
c400bac4db Merge pull request #3332 from phatblat/ben/doc-warnings
Resolve documentation warnings
2015-08-01 15:38:04 +02:00
Ben Chatelain
08afd227df Fix remaining documentation warnings 2015-07-27 18:32:55 -06:00
Ben Chatelain
f90fbb8d22 Use correct Doxygen trailing comment syntax 2015-07-27 17:42:08 -06:00
Ben Chatelain
41808d0470 Fix @param names in doc comments 2015-07-27 14:46:50 -06:00
Edward Thomson
759b2230a5 Merge pull request #3303 from libgit2/cmn/index-add-submodule
Allow adding a submodule through git_index_add_bypath
2015-07-24 15:04:20 -05:00
Edward Thomson
91dad18143 Merge pull request #3305 from libgit2/cmn/reflog-del-backend
refdb: delete a ref's reflog upon deletion
2015-07-24 15:01:04 -05:00
Ryan Roden-Corrent
37996d474b Document git_fetch_options struct and fix typo.
git_fetch_options was missing from the API docs because it lacked a
documentation comment above the struct declaration.
I used the git_checkout_options docstring as a template.

Also fixes a typo in git_remote_prune_refs (remote, not reamote).
2015-07-20 09:48:01 -04:00
Carlos Martín Nieto
01d0c02dba refdb: delete a ref's reflog upon deletion
Removing a reflog upon ref deletion is something which only some
backends might wish to do. Backends which are database-backed may wish
to archive a reflog, log-based ones may not need to do anything.
2015-07-12 19:08:06 +02:00
Carlos Martín Nieto
8a52ed7a48 errors: add EDIRECTORY
This is to be returned when the operation which the user asked for is
not possible to do on a directory.
2015-07-12 12:11:22 +02:00
Edward Thomson
79698030b0 git_cert: child types use proper base type 2015-07-10 09:28:33 -05:00
Carlos Martín Nieto
9847d80ddc Merge pull request #3281 from ethomson/wildcard_filters
filters: custom filters with wildcard attributes
2015-07-09 18:21:31 +02:00
Carlos Martín Nieto
3704ac35d3 Merge pull request #3277 from git-up/git_diff_index_to_index
Added git_diff_index_to_index()
2015-07-07 12:38:47 +02:00
Carlos Martín Nieto
a94d3e68bf filter: add docs for streaming filters
These functions are available on the public API but don't have any
documentation, so they don't appear on the API reference. Fix that.
2015-07-03 14:36:41 +02:00
Carlos Martín Nieto
34065968ed submodule: completely remove reload_all
The function was removed, but its declaration and changelog entry about
its removal were forgotten.

The comment in the test doesn't make any sense as the function doesn't
exist anymore, so get rid of it as well.
2015-07-01 17:49:07 +02:00
Edward Thomson
63924435a1 filters: custom filters with wildcard attributes
Allow custom filters with wildcard attributes, so that clients
can support some random `filter=foo` in a .gitattributes and look
up the corresponding smudge/clean commands in the configuration file.
2015-07-01 09:40:11 -05:00
Pierre-Olivier Latour
ccef5adb63 Added git_diff_index_to_index() 2015-06-30 10:03:32 -07:00
Carlos Martín Nieto
84d5a98f80 Bump version to 0.23.0 and SOVERSION to 23 2015-06-28 14:53:30 +02:00
Carlos Martín Nieto
354268ca48 Merge pull request #3259 from ethomson/stash_apply_argh
Stash apply: stage new files even when not updating the index
2015-06-26 17:46:35 +02:00
Edward Thomson
c0280bdd15 Merge pull request #3255 from libgit2/cmn/rename-unspecified
Rename FALLBACK to UNSPECIFIED
2015-06-25 18:55:48 -04:00
Edward Thomson
82b1c93d08 stash: don't allow apply with staged changes 2015-06-25 18:34:36 -04:00
Edward Thomson
87987fd1e0 Merge pull request #3246 from libgit2/cmn/dont-grow-borrowed
Don't allow growing borrowed buffers
2015-06-25 15:26:43 -04:00
Carlos Martín Nieto
c2418f4613 Rename FALLBACK to UNSPECIFIED
Fallback describes the mechanism, while unspecified explains what the
user is thinking.
2015-06-25 12:48:44 +02:00
Carlos Martín Nieto
189aad45af errors: introduce EINVALID
We've been using EINVALIDSPEC for a while to mean this, but that name
is too specific. Introduce this to be more explicit.
2015-06-24 23:49:10 +02:00
Carlos Martín Nieto
bd470d0034 blob: don't recomment using git_buf_grow
We currently recommend using `git_buf_grow` in order to make a buffer
make an owned copy of the memory it points to. This is not behaviour we
should encourage, so remove this recommendation.

The function itself is not changed, as we need to remain compatible, but
it will be changed not to allow usage on borrowed buffers.
2015-06-24 23:49:10 +02:00
Carlos Martín Nieto
daacf96d10 Merge pull request #3097 from libgit2/cmn/submodule-config-state
Remove run-time configuration settings from submodules
2015-06-24 23:34:40 +02:00
Carlos Martín Nieto
cdee630f6f curl: extract certificate information
The information is exposed by curl for some crypto libraries in the form
of name:content strings. We can't do much more than return this
information.
2015-06-24 17:26:36 +02:00
Carlos Martín Nieto
1376e784c6 stream: add support for setting a proxy
If the stream claims to support this feature, we can let the transport
set the proxy.

We also set HTTPPROXYTUNNEL option so curl can create a tunnel through
the proxy which lets us create our own TLS session (if needed).
2015-06-24 17:26:36 +02:00
Edward Thomson
09f3364d7a Merge pull request #3131 from urkud/const-char
Add `const` qualifier
2015-06-23 23:40:02 -04:00
Carlos Martín Nieto
783672fa5b submodule: remove the RESET enum values
These are not useful anymore, as we don't affect the instance's
configuration.
2015-06-22 17:02:56 +02:00
Carlos Martín Nieto
961861fafa submodule: get rid of _save()
We no longer have any setters which affect an instance, so
`git_submodule_save()` is no longer relevant.
2015-06-22 17:02:55 +02:00
Carlos Martín Nieto
d6073b30f3 submodule: make _set_url() affect the configuration
With this one, we can get rid of the edit_and_save test.
2015-06-22 17:02:55 +02:00
Carlos Martín Nieto
486ba4cdd3 submodule: make _set_branch() affect the configuration 2015-06-22 17:02:55 +02:00
Carlos Martín Nieto
4e63642321 submodule: make _set_update_fetch_recurse_submodules() affect the config
Similarly to the other ones. In this test we copy over testing
`RECURSE_YES` which shows an error in our handling of the `YES` variant
which we may have to port to the rest.
2015-06-22 17:02:55 +02:00
Carlos Martín Nieto
e8a39f8ed1 submodule: make _set_update() affect the configuration
Moving on with the removal of runtime-changing variables, the update
setting for a remote is whatever it was when it was looked up.
2015-06-22 17:02:55 +02:00