|
bd270b70
|
2014-04-18T17:08:10
|
|
cred: tighten username rules
The ssh-specific credentials allow the username to be missing. The idea
being that the ssh transport will then use the username provided in the
url, if it's available. There are two main issues with this.
The credential callback already knows what username was provided by the
url and needs to figure out whether it wants to ask the user for it or
it can reuse it, so passing NULL as the username means the credential
callback is suspicious.
The username provided in the url is not in fact used by the
transport. The only time it even considers it is for the user/pass
credential, which asserts the existence of a username in its
constructor. For the ssh-specific ones, it passes in the username stored
in the credential, which is NULL. The libssh2 macro we use runs strlen()
against this value (which is no different from what we would be doing
ourselves), so we then crash.
As the documentation doesn't suggest to leave out the username, assert
the need for a username in the code, which removes this buggy behavior
and removes implicit state.
git_cred_has_username() becomes a blacklist of credential types that do
not have a username. The only one at the moment is the 'default' one,
which is meant to call up some Microsoft magic.
|
|
1392418e
|
2014-03-18T09:04:33
|
|
Seamless support for NTLM/Kerberos auth on Windows
|
|
5187b609
|
2014-03-07T14:58:43
|
|
local transport: catch double-opens
Combinations of connect + fetch can call local_open multiple
times. Detect this and skip the initialization stage.
|
|
300f4412
|
2014-02-25T11:56:11
|
|
- BUGFIX #2133 (@fourplusone) in smart_protocol.c
- added MSVC cmake definitions to disable warnings
- general.c is rewritten so it is ansi-c compatible and compiles ok on microsoft windows
- some MSVC reported warning fixes
|
|
8bf476ac
|
2014-01-19T16:24:58
|
|
Factor out code to convert local "url" into a path.
Previously this code was shared between `local_push` and `local_connect`.
|
|
4e974c97
|
2014-01-18T08:02:58
|
|
Fix local push to file:// URL.
|
|
0b28217b
|
2014-01-15T12:51:31
|
|
refs: remove the _with_log differentiation
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
|
|
9cfce273
|
2013-12-12T12:11:38
|
|
Cleanups, renames, and leak fixes
This renames git_vector_free_all to the better git_vector_free_deep
and also contains a couple of memory leak fixes based on valgrind
checks. The fixes are specifically: failure to free global dir
path variables when not compiled with threading on and failure to
free filters from the filter registry that had not be initialized
fully.
|
|
25e0b157
|
2013-12-06T15:07:57
|
|
Remove converting user error to GIT_EUSER
This changes the behavior of callbacks so that the callback error
code is not converted into GIT_EUSER and instead we propagate the
return value through to the caller. Instead of using the
giterr_capture and giterr_restore functions, we now rely on all
functions to pass back the return value from a callback.
To avoid having a return value with no error message, the user
can call the public giterr_set_str or some such function to set
an error message. There is a new helper 'giterr_set_callback'
that functions can invoke after making a callback which ensures
that some error message was set in case the callback did not set
one.
In places where the sign of the callback return value is
meaningful (e.g. positive to skip, negative to abort), only the
negative values are returned back to the caller, obviously, since
the other values allow for continuing the loop.
The hardest parts of this were in the checkout code where positive
return values were overloaded as meaningful values for checkout.
I fixed this by adding an output parameter to many of the internal
checkout functions and removing the overload. This added some
code, but it is probably a better implementation.
There is some funkiness in the network code where user provided
callbacks could be returning a positive or a negative value and
we want to rely on that to cancel the loop. There are still a
couple places where an user error might get turned into GIT_EUSER
there, I think, though none exercised by the tests.
|
|
dab89f9b
|
2013-12-04T21:22:57
|
|
Further EUSER and error propagation fixes
This continues auditing all the places where GIT_EUSER is being
returned and making sure to clear any existing error using the
new giterr_user_cancel helper. As a result, places that relied
on intercepting GIT_EUSER but having the old error preserved also
needed to be cleaned up to correctly stash and then retrieve the
actual error.
Additionally, as I encountered places where error codes were not
being propagated correctly, I tried to fix them up. A number of
those fixes are included in the this commit as well.
|
|
9f77b3f6
|
2013-11-25T14:21:34
|
|
Add config read fns with controlled error behavior
This adds `git_config__lookup_entry` which will look up a key in
a config and return either the entry or NULL if the key was not
present. Optionally, it can either suppress all errors or can
return them (although not finding the key is not an error for this
function). Unlike other accessors, this does not normalize the
config key string, so it must only be used when the key is known
to be in normalized form (i.e. all lower-case before the first dot
and after the last dot, with no invalid characters).
This also adds three high-level helper functions to look up config
values with no errors and a fallback value. The three functions
are for string, bool, and int values, and will resort to the
fallback value for any error that arises. They are:
* `git_config__get_string_force`
* `git_config__get_bool_force`
* `git_config__get_int_force`
None of them normalize the config `key` either, so they can only
be used for internal cases where the key is known to be in normal
format.
|
|
db4cbfe5
|
2013-12-02T14:09:12
|
|
Updates to cancellation logic during download and indexing of packfile.
|
|
ee7040fd
|
2013-11-20T14:11:44
|
|
ssh: add support for ssh-agent authentication
|
|
84efffc3
|
2013-11-13T16:57:51
|
|
Introduce git_cred_default for NTLM/SPNEGO auth
|
|
80fc7d6b
|
2013-11-13T16:46:45
|
|
Propagate auth error codes as GIT_EUSER in winhttp
|
|
6414fd33
|
2013-11-11T06:47:15
|
|
Merge pull request #1956 from libgit2/cmn/fetch-default-head
Remote revamp (director's cut)
|
|
a6192d7c
|
2013-11-11T15:32:13
|
|
remote: update head list on push
A previous commit forgot to update the head list after push as well,
leading to wrong output of git_remote_ls().
|
|
359dce72
|
2013-11-02T00:05:32
|
|
remote: make _ls return the list directly
The callback-based method of listing remote references dates back to the
beginning of the network code's lifetime, when we didn't know any
better.
We need to keep the list around for update_tips() after disconnect() so
let's make use of this to simply give the user a pointer to the array so
they can write straightforward code instead of having to go through a
callback.
|
|
0df96f2b
|
2013-11-10T07:31:21
|
|
Merge pull request #1936 from libgit2/better-url-parsing
Streamline url-parsing logic.
|
|
7616b8d3
|
2013-11-05T17:34:45
|
|
don't double free pkt
|
|
ac72051a
|
2013-11-04T19:09:30
|
|
Fix ssh.c compile
|
|
c227c173
|
2013-11-04T11:42:14
|
|
Use http_parser_parse_url to parse urls
|
|
af613ecd
|
2013-10-28T23:30:45
|
|
remote: store dwimed refspecs separately
This allows us to add e.g. "HEAD" as a refspec when none are given
without overwriting the user's data.
|
|
a7382aa2
|
2013-10-26T16:52:54
|
|
remote: give up after 256 failures to find a common object
This avoids sending our whole history bit by bit to the remote in cases
where there is no common history, just to give up in the end.
The number comes from the canonical implementation.
|
|
ac5e507c
|
2013-11-01T09:31:52
|
|
Merge pull request #1918 from libgit2/cmn/indexer-naming
indexer: remove the stream infix
|
|
048f837b
|
2013-10-31T13:30:22
|
|
Prevent another segfault from bad URL
|
|
29b77446
|
2013-10-30T15:38:52
|
|
Initialize variables
|
|
2f8c481c
|
2013-10-08T16:22:21
|
|
protocol: basic support for multi_ack_detailed
This tells the server that we speak it, but we don't make use of its
extra information to determine if there's a better place to stop
negotiating.
In a somewhat-related change, reorder the capabilities so we ask for
them in the same order as git does.
Also take this opportunity to factor out a fairly-indented portion of
the negotiation logic.
|
|
a6154f21
|
2013-10-30T15:00:05
|
|
indexer: remove the stream infix
It was there to keep it apart from the one which read in from a file on
disk. This other indexer does not exist anymore, so there is no need for
anything other than git_indexer to refer to it.
While here, rename _add() function to _append() and _finalize() to
_commit(). The former change is cosmetic, while the latter avoids
talking about "finalizing", which OO languages use to mean something
completely different.
|
|
5c50f22a
|
2013-10-28T09:25:44
|
|
Merge pull request #1891 from libgit2/cmn/fix-thin-packs
Add support for thin packs
|
|
5565f3cd
|
2013-10-28T07:04:58
|
|
Merge pull request #1904 from libgit2/cmn/ssh-naming
Rename the ssh credentials
|
|
df9fc82e
|
2013-10-25T13:33:42
|
|
Use two calls to set two headers
|
|
5cb13670
|
2013-10-23T15:45:29
|
|
transport: let the progress output return an error
There are any number of issues that can come up in the progress
callback, and we should let the user cancel at that point as well.
|
|
70a8c78f
|
2013-10-23T12:08:54
|
|
Rename the ssh credentials
The names from libssh2 are somewhat obtuse for us. We can simplify the
usual key/passphrase credential's name, as well as make clearer what the
custom signature function is.
|
|
2648dc1a
|
2013-10-21T11:03:31
|
|
Allowed credential types should be a bitfield
|
|
3dc3c723
|
2013-10-08T15:52:37
|
|
Combine WinHTTP API calls
|
|
a58eecd4
|
2013-10-08T13:40:52
|
|
WinHTTP: set Accept header for POSTs
|
|
b4342b11
|
2013-10-04T10:27:45
|
|
net: advertise our support for fixing thin packs
|
|
7baa7631
|
2013-10-02T15:39:18
|
|
Style tweaks and changes for code review feedback
|
|
5b188225
|
2013-10-02T13:45:32
|
|
Support cancellation in push operation
This commit adds cancellation for the push operation. This work consists of:
1) Support cancellation during push operation
- During object counting phase
- During network transfer phase
- Propagate GIT_EUSER error code out to caller
2) Improve cancellation support during fetch
- Handle cancellation request during network transfer phase
- Clear error string when cancelled during indexing
3) Fix error handling in git_smart__download_pack
Cancellation during push is still only handled in the pack building and
network transfer stages of push (and not during packbuilding).
|
|
e3c131c5
|
2013-09-16T05:02:25
|
|
remote: move the credentials callback to the struct
Move this one as well, letting us have a single way of setting the
callbacks for the remote, and removing fields from the clone options.
|
|
fba14763
|
2013-09-30T15:03:35
|
|
Merge pull request #1879 from libgit2/redir-refactor
Redir refactor
|
|
b176eded
|
2013-09-19T14:52:57
|
|
Initial Implementation of progress reports during push
This adds the basics of progress reporting during push. While progress
for all aspects of a push operation are not reported with this change,
it lays the foundation to add these later. Push progress reporting
can be improved in the future - and consumers of the API should
just get more accurate information at that point.
The main areas where this is lacking are:
1) packbuilding progress: does not report progress during deltafication,
as this involves coordinating progress from multiple threads.
2) network progress: reports progress as objects and bytes are going
to be written to the subtransport (instead of as client gets
confirmation that they have been received by the server) and leaves
out some of the bytes that are transfered as part of the push protocol.
Basically, this reports the pack bytes that are written to the
subtransport. It does not report the bytes sent on the wire that
are received by the server. This should be a good estimate of
progress (and an improvement over no progress).
|
|
256961e4
|
2013-09-26T16:36:05
|
|
WHOOPS
|
|
1b02baf4
|
2013-09-26T16:25:05
|
|
Adjust to new utility signature
|
|
ea59f659
|
2013-09-26T16:20:30
|
|
Deploy gitno_connection_data into transport (winhttp)
...and have that call manage replaced memory in the output structure.
|
|
83fbd368
|
2013-09-26T15:58:41
|
|
Deploy gitno_connection_data into transport
|
|
f30d91ce
|
2013-09-26T11:03:27
|
|
Refactor URL handling to use library call
|
|
8988688c
|
2013-09-25T20:41:56
|
|
Migrate redirect URL handling to common utility
|
|
ac316e74
|
2013-09-25T14:25:38
|
|
Why are we disabling redirects?
|
|
4a88eb20
|
2013-09-25T12:13:09
|
|
Win32: handle http->https redirects
|
|
46fbc88e
|
2013-09-24T14:50:06
|
|
Prevent HTTPS to HTTP redirect
|
|
eb0ff130
|
2013-09-24T14:07:08
|
|
Disconnect path string to preserve after redirect
The subtransport path was relying on pointing to data owned by
the remote which meant that after a redirect, the updated path
was getting lost for future requests. This updates the http
transport to strdup the path and maintain its own lifetime.
This also pulls responsibility for parsing the URL back into the
http transport and isolates the functions that parse and free that
connection data so that they can be reused between the initial
parsing and the redirect parsing.
|
|
210d5325
|
2013-09-23T12:09:23
|
|
Allow redirects to use same host
|
|
92d19d16
|
2013-09-21T09:34:03
|
|
Merge pull request #1840 from linquize/warning
Fix warning
|
|
66566516
|
2013-09-08T17:15:42
|
|
Fix warning
|
|
eec4dcc3
|
2013-08-09T13:14:19
|
|
Whitespace.
|
|
b622aabe
|
2013-08-09T13:14:06
|
|
Add a wrapper to provide the libssh2 error message
|
|
b345026b
|
2013-09-10T05:16:52
|
|
Test for repo before removing leading colon
|
|
fbabe855
|
2013-09-08T14:11:08
|
|
Trim leading colon from ssh repository path
|
|
f42d546c
|
2013-09-04T13:07:42
|
|
Provide better errors for push on non-bare local remotes
|
|
1ff3a094
|
2013-08-27T19:41:44
|
|
Improve win32 version check, no ipv6 tests on XP
|
|
520287f6
|
2013-08-19T02:17:00
|
|
Merge pull request #1785 from libgit2/cmn/odb-hash-frontend
odb: move hashing to the frontend for streaming
|
|
376e6c9f
|
2013-08-15T13:48:35
|
|
odb: wrap the stream reading and writing functions
This is in preparation for moving the hashing to the frontend, which
requires us to handle the incoming data before passing it to the
backend's stream.
|
|
c87bf86c
|
2013-08-14T10:58:02
|
|
Commit 7affc2f7 removed var initialization
That commit accidentally removed the initialization of the "start"
variable giving undefined results for the host extraction from the
url input.
|
|
40948998
|
2013-08-13T11:36:24
|
|
Merge pull request #1767 from libgit2/win32-bigger-utf8-buffer
Bigger buffer for utf-8 parsing in win32
|
|
d4cff0cb
|
2013-08-13T09:40:32
|
|
Rename git__win32_path fns to git_win32_path
|
|
abf37327
|
2013-08-13T09:15:39
|
|
windows: Path conversion with better semantics
|
|
7affc2f7
|
2013-08-11T23:30:47
|
|
Include username in each credential type
Key-based authentication also needs an username, so include it in each
one.
Also stop assuming a default username of "git" in the ssh transport
which has no business making such a decision.
|
|
aaefbdee
|
2013-08-08T08:48:57
|
|
Discriminate path-specific and general UTF-X conversions
|
|
2c0128ee
|
2013-08-07T19:29:33
|
|
Rename git_win_str_utf* to git_win32_path_utf*
|
|
9c38f7a6
|
2013-08-07T13:22:41
|
|
Add typedefs for win32 utf-8 and utf-16 buffers
...and normalize the signatures of the two conversion functions.
|
|
d8563619
|
2013-08-05T11:41:39
|
|
Split UTF-16 and UTF-8 buffer sizes for win32
Also fixed up call-sites to use the correct buffer sizes, especially
when converting to utf-8.
|
|
33c8c6f0
|
2013-07-10T10:48:32
|
|
trivial whitespace fixup
|
|
c2de6b1a
|
2013-07-10T10:21:24
|
|
Bring SSH error reporting up to base standards
The SSH error checking and reporting could still be further
improved by using the libssh2 native methods to get error info,
but at least this ensures that all error codes are checked and
translated into libgit2 error messages.
|
|
68bc49a1
|
2013-07-10T09:20:46
|
|
Merge branch 'ssh-cred-fix' of tiennou/libgit2
Conflicts:
src/transports/ssh.c
|
|
08bf80fa
|
2013-07-10T10:29:32
|
|
Tab indent.
|
|
367c1903
|
2013-07-10T10:29:09
|
|
Add some missing error messages.
|
|
a4456929
|
2013-07-09T16:16:24
|
|
Make credential clearing consistent
This makes all of the credential objects use the same pattern to
clear the contents and call git__memzero when done. Much of this
information is probably not sensitive, but it also seems better
to just clear consistently.
|
|
03d9b930
|
2013-07-09T14:45:58
|
|
Indent with tabs
|
|
5813bc21
|
2013-07-09T12:01:16
|
|
Lots of SSH credential stuff can be left on
Much of the SSH credential creation API can be left enabled even
on platforms with no SSH support. We really just have to give an
error when you attempt to open the SSH connection.
|
|
a3c062db
|
2013-07-09T09:58:33
|
|
Make SSH APIs present even without SSH support
The SSH APIs will just return an error code and state that the
library was built without SSH support if they are called in
that case.
|
|
f6bd0863
|
2013-07-03T22:02:44
|
|
Fix a probable leak.
|
|
219f318c
|
2013-07-03T22:02:29
|
|
Fix a crash if git_remote_set_cred_acquire_cb wasn't called before connecting.
Fixes #1700.
|
|
9728cfde
|
2013-06-25T11:17:55
|
|
Make sure we don't leak memory again.
|
|
edbaa63a
|
2013-06-25T09:04:04
|
|
Unbreak git_remote_ls on a local transport after disconnecting.
|
|
8c510b83
|
2013-06-24T21:02:42
|
|
Fix a leak in the local transport code.
|
|
0525fb7e
|
2013-06-17T14:31:14
|
|
cred: deploy git__memzero to clear memory holding a password
|
|
37f66e82
|
2013-06-12T15:21:21
|
|
Fix Windows warnings
This fixes problems with missing function prototypes and 64-bit
data issues on Windows.
|
|
e3107e0e
|
2013-05-16T11:35:02
|
|
Merge pull request #1558 from bmorganpa/ssh_transport
SSH Transport
|
|
7026ad89
|
2013-05-16T21:08:55
|
|
calloc() to initialize memory
|
|
1fed6b07
|
2013-05-13T21:57:37
|
|
Fix trailing whitespaces
|
|
84ac625d
|
2013-05-15T12:51:40
|
|
Added GITERR_CHECK_ALLOC
|
|
ccaee222
|
2013-05-15T12:46:33
|
|
Added GITERR_CHECK_ALLOC
|
|
e057e411
|
2013-05-15T12:44:51
|
|
Reworked git_cred_ssh_keyfile_passphrase_new method
|
|
b54ed3ef
|
2013-05-15T12:41:16
|
|
Added error check
|
|
22011b33
|
2013-05-15T12:38:40
|
|
Cleanup
|
|
0cb16fe9
|
2013-05-15T20:26:55
|
|
Unify whitespaces to tabs
|
|
e583334c
|
2013-05-10T21:42:22
|
|
Fix broken build when MSVC SDL checks is enabled
|
|
2b562c3a
|
2013-05-04T16:32:58
|
|
refs: remove the OID/SYMBOLIC filtering
Nobody should ever be using anything other than ALL at this level, so
remove the option altogether.
As part of this, git_reference_foreach_glob is now implemented in the
frontend using an iterator. Backends will later regain the ability of
doing the glob filtering in the backend.
|