joshaber
eda726cfb5
Use a typedef for the submodule_foreach callback.
...
This fits with the style for the rest of the project, but more
importantly, makes life easier for bindings authors who auto-generate
code.
2015-12-08 11:34:00 -05:00
Edward Thomson
5b9c63c3f6
recursive merge: add a recursion limit
2015-11-25 16:25:47 -05:00
Edward Thomson
86c8d02c07
merge: add simple recursive test
...
Add a simple recursive test - where multiple ancestors exist and
creating a virtual merge base from them would prevent a conflict.
2015-11-25 15:37:11 -05:00
Edward Thomson
fa78782f67
merge: rename git_merge_tree_flags_t
-> git_merge_flags_t
2015-11-25 15:37:05 -05:00
Carlos Martín Nieto
2ea40fdaac
repository: distinguish sequencer cherry-pick and revert
...
These are not quite like their plain counterparts and require special handling.
2015-11-20 13:19:23 -05:00
Edward Thomson
3eac1037d6
settings: allow users to set PROGRAMDATA
...
Allow users to set the `git_libgit2_opts` search path for the
`GIT_CONFIG_LEVEL_PROGRAMDATA`. Convert `GIT_CONFIG_LEVEL_PROGRAMDATA`
to `GIT_SYSDIR_PROGRAMDATA` for setting the configuration.
2015-11-16 23:31:19 -05:00
Carlos Martín Nieto
75a0ccf52f
Merge pull request #3170 from CmdrMoozy/nsec_fix
...
git_index_entry__init_from_stat: set nsec fields in entry stats
2015-11-12 19:53:09 +01:00
Carlos Martín Nieto
de870533e0
settings: add a setter for a custom user-agent
2015-11-12 17:18:42 +01:00
Carlos Martín Nieto
7fafde6325
stream: allow registering a user-provided TLS constructor
...
This allows the application to use their own TLS stream, regardless of
the capabilities of libgit2 itself.
2015-11-03 08:10:29 -08:00
Jason Haslam
3138ad9366
Add diff progress callback.
2015-11-02 16:33:58 -05:00
Leo Yang
bf28da4718
Fix build for custom transport users
...
We should explicitly include the declaration of git_strarray
from "include/git2/sys/transport.h"
2015-10-30 14:17:11 -04:00
Vicent Marti
a1f5d691a2
merge: Implement GIT_MERGE_TREE_SKIP_REUC
2015-10-27 22:44:26 +01:00
Edward Thomson
821131fdae
Merge pull request #3477 from linquize/inttypes.h
...
inttypes.h is built-in header file since MSVC 2013
2015-10-23 10:13:14 -05:00
Edward Thomson
8683d31f08
merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICT
...
Provide a new merge option, GIT_MERGE_TREE_FAIL_ON_CONFLICT, which
will stop on the first conflict and fail the merge operation with
GIT_EMERGECONFLICT.
2015-10-22 14:55:17 -04:00
Linquize
240a85cf10
inttypes.h is built-in header file since MSVC 2013
...
The reason is that the types defined in libgit2's inttypes.h collide with system inttypes.h
3rd party library header files may directly reference MSVC's built-in inttypes.h
Fixes #3476
2015-10-22 07:56:34 +08:00
Edward Thomson
44b1e3e390
Merge pull request #3475 from libgit2/cmn/programdata-config
...
config: add a ProgramData level
2015-10-21 13:43:22 -07:00
Edward Thomson
0f9b6742ad
win32: add c linkage guard around inttypes.h inclusion
2015-10-21 09:24:10 -04:00
Carlos Martín Nieto
8c7c5fa585
config: add a ProgramData level
...
This is where portable git stores the global configuration which we can
use to adhere to it even though git isn't quite installed on the system.
2015-10-21 15:11:18 +02:00
Carlos Martín Nieto
8321596a49
Merge pull request #3444 from ethomson/add_preserves_conflict_mode
...
Preserve modes from a conflict in `git_index_insert`
2015-10-15 12:22:10 +02:00
Axel Rasmussen
c7b17fb5cd
Merge branch 'master' into nsec_fix_next
2015-10-01 18:01:32 -07:00
Arthur Schreiber
d3b29fb94b
refdb and odb backends must provide free
function
...
As refdb and odb backends can be allocated by client code, libgit2
can’t know whether an alternative memory allocator was used, and thus
should not try to call `git__free` on those objects.
Instead, odb and refdb backend implementations must always provide
their own `free` functions to ensure memory gets freed correctly.
2015-10-01 00:50:37 +02:00
Edward Thomson
21515f228b
index: also try conflict mode when inserting
...
When we do not trust the on-disk mode, we use the mode of an existing
index entry. This allows us to preserve executable bits on platforms
that do not honor them on the filesystem.
If there is no stage 0 index entry, also look at conflicts to attempt
to answer this question: prefer the data from the 'ours' side, then
the 'theirs' side before falling back to the common ancestor.
2015-09-30 09:06:09 -04:00
Carlos Martín Nieto
72b7c57093
Merge pull request #3411 from spraints/custom-push-headers
...
Include custom HTTP headers
2015-09-30 09:17:18 +02:00
Axel Rasmussen
0269833f92
settings: expose GIT_USE_NSEC flag in git_libgit2_features
2015-09-18 23:33:56 -07:00
Matt Burke
c49126c87f
Accept custom headers for fetch too
2015-09-10 08:34:35 -04:00
Matt Burke
4f2b6093a6
Tell the git_transport about the custom_headers
2015-09-08 14:02:33 -04:00
Matt Burke
9da32a6255
Add custom_headers to git_push_options
2015-09-08 14:02:25 -04:00
Matt Burke
24f5b4e155
Drop extra_http_headers from git_remote
2015-09-08 14:01:57 -04: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
Matt Burke
59d6128e27
Allow the world to set HTTP headers for remotes
2015-09-04 09:36:50 -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