Commit Graph

1469 Commits

Author SHA1 Message Date
Carlos Martín Nieto
9b9405865e Provide a callback for certificate validation
If the certificate validation fails (or always in the case of ssh),
let the user decide whether to allow the connection.

The data structure passed to the user is the native certificate
information from the underlying implementation, namely OpenSSL or
WinHTTP.
2014-09-16 17:01:30 +02:00
Carlos Martín Nieto
6a0d2b43ee Merge remote-tracking branch 'upstream/master' into cmn/ssh-retry 2014-08-27 15:09:07 +02:00
Vicent Marti
d28b2b7a5f Merge pull request #2528 from libgit2/vmg/tostr_s
Export `git_oid_tostr_s` instead of `_allocfmt`
2014-08-18 15:18:59 +02:00
Vicent Marti
4ca0b566ca 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.
2014-08-18 12:41:06 +02:00
Edward Thomson
c180c06586 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://").
2014-08-14 08:52:20 -05:00
Vicent Marti
243db06ce3 Merge pull request #2484 from libgit2/fix-git-status-list-new-unreadable-folder
Fix git status list new unreadable folder
2014-07-23 07:57:20 +02:00
Edward Thomson
0ba4dca526 git_cherry_pick -> git_cherrypick 2014-07-22 10:40:23 -04:00
Alan Rogers
7d0ab0fae0 Merge remote-tracking branch 'origin/master' into fix-git-status-list-new-unreadable-folder 2014-07-22 15:08:24 +10:00
Alan Rogers
35b1471f01 Move the UNREADABLE enums to the correct group. 2014-07-22 11:17:42 +10:00
joshaber
b3af2d80d2 Just put it all in buffer. 2014-07-16 13:34:25 -07:00
joshaber
df4cba0f28 Export git_buf_text_is_binary and git_buf_text_contains_nul.
So that users don’t need to implement binary detection themselves.
2014-07-15 17:38:39 -07:00
Vicent Marti
44cfb6f387 Merge pull request #2463 from libgit2/cmn/ssh-factory-for-paths
ssh: provide a factory function for setting ssh paths
2014-07-11 16:49:23 +02:00
Carlos Martín Nieto
eb5f03461f checkout: fix docs formatting for the options 2014-07-11 12:22:48 +02:00
Alan Rogers
4edd1a036b Merge remote-tracking branch 'origin/development' into fix-git-status-list-new-unreadable-folder 2014-07-10 19:17:34 -07:00
Carlos Martín Nieto
18eb6ec823 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.
2014-07-08 10:30:19 +02:00
Carlos Martín Nieto
d4256ed554 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.
2014-07-07 14:51:51 +02:00
Jacques Germishuys
268dafa260 Fix git_cred_ssh_interactive_callback signature 2014-07-03 20:19:16 +02:00
Vicent Marti
cb6e68c7e6 Merge pull request #2449 from libgit2/cmn/maint-21
Maint fixes for ssl initing and ssh exposure
2014-07-02 16:45:02 +02:00
Carlos Martín Nieto
6812afaf38 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.
2014-07-02 07:05:00 +02:00
Carlos Martín Nieto
d58a64e9a5 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.
2014-07-02 07:05:00 +02:00
Carlos Martín Nieto
00b8c216c2 ssh: always declare the libssh2 types
This lets a user decide they do want to use keyboard-interactive after
they've compiled.
2014-06-30 23:27:20 +02:00
Carlos Martín Nieto
eac63e6754 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.
2014-06-30 10:03:36 +02:00
Philip Kelley
1697cd6ff5 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
2014-06-26 22:34:37 -04:00
Carlos Martín Nieto
d1c281a552 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.
2014-06-26 22:58:38 +02:00
Carlos Martín Nieto
54da69588e 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.
2014-06-26 22:58:38 +02:00
Carlos Martín Nieto
8873728f37 Introduce GIT_EAUTH
Introduce this error code to signal an authentication failure.
2014-06-26 22:58:38 +02:00
Edward Thomson
4e813a8b60 Export git_revert_commit 2014-06-25 09:11:16 -04:00
Carlos Martín Nieto
5e37874dd4 Merge remote-tracking branch 'upstream/cmn/treebuilder-perf' 2014-06-24 17:51:45 +02:00
Carlos Martín Nieto
76f76162b2 remote: update documentation
Add docs for git_clone_local_t and move the docs for the
git_clone_options to each field.
2014-06-11 21:20:23 +02:00
Carlos Martín Nieto
978fbb4c34 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.
2014-06-10 15:14:13 +02:00
Carlos Martín Nieto
4d3f1f9740 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.
2014-06-10 15:14:13 +02:00
Carlos Martín Nieto
17fbf852a5 pathspec: use C guards in header 2014-06-10 03:53:26 +02:00
Carlos Martín Nieto
281da0043c remote: fix rename docs 2014-06-09 19:35:41 +02:00
Carlos Martín Nieto
4fb32a44f9 Bump version to 0.21.0
Bump library version to 0.21.0 and SONAME to 21
2014-06-08 20:01:02 +02:00
Carlos Martín Nieto
9980767205 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.
2014-06-08 19:42:54 +02:00
Carlos Martín Nieto
231f350d91 remote: don't free the remote on delete
This was a bad idea. Don't free except in the free function.
2014-06-06 22:55:34 +02:00
Carlos Martín Nieto
72bca13e5d 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.
2014-06-06 21:43:04 +02:00
Alan Rogers
9e2d2f30de Whitespace wibbles. 2014-06-04 15:41:48 -07:00
Alan Rogers
dc49e1b5b3 Merge remote-tracking branch 'origin/development' into fix-git-status-list-new-unreadable-folder
Conflicts:
	include/git2/diff.h
2014-06-04 15:36:28 -07:00
Alan Rogers
7b491a7dea GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED 2014-06-03 17:50:00 -07:00
Alan Rogers
79d5b5c916 Add GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED
and a (failing) test for it.
2014-06-03 17:42:52 -07:00
Carlos Martín Nieto
dedfc7346b 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.
2014-06-03 16:05:36 +02:00
Carlos Martín Nieto
11e2665e50 Formatting fixes for the docs
These are some issues I found while playing around with the new parser
for docurium.
2014-06-03 16:05:35 +02:00
Alan Rogers
66271925a1 Add GIT_STATUS_OPT_INCLUDE_UNREADABLE 2014-05-30 16:21:49 -07:00
Alan Rogers
a777fc3785 Remove GIT_FILEMODE_NEW as it's unused.
And use 0 for GIT_FILEMODE_UNREADABLE.
2014-05-30 16:21:13 -07:00
Vicent Marti
31c551528b Merge pull request #2011 from libgit2/cmn/clone-local
Local clone
2014-05-29 14:50:57 +02:00
Ungureanu Marius
fda73bc5fd [Blob] Update documentation for is_binary.
filter.h tells me that we check the first 8000 bytes.
2014-05-28 22:57:21 +03:00
Carlos Martín Nieto
2614819cf3 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).
2014-05-28 15:40:47 +02:00
Carlos Martín Nieto
c1dbfcbb4a clone: add flag not to link 2014-05-28 15:40:22 +02:00
Carlos Martín Nieto
121b26738e clone: add flags to override whether to perform a local clone 2014-05-28 15:40:22 +02:00