Commit Graph

5164 Commits

Author SHA1 Message Date
Russell Belfer
c2de6b1adf 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.
2013-07-10 10:21:24 -07:00
Russell Belfer
68bc49a158 Merge branch 'ssh-cred-fix' of tiennou/libgit2
Conflicts:
	src/transports/ssh.c
2013-07-10 09:20:46 -07:00
Etienne Samson
08bf80fa2b Tab indent. 2013-07-10 09:42:28 +02:00
Etienne Samson
367c1903e9 Add some missing error messages. 2013-07-10 09:33:14 +02:00
Vicent Martí
b8cd7aa9f6 Merge pull request #1704 from arrbee/kill-status-index-then-workdir
Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option
2013-07-09 17:20:55 -07:00
Vicent Martí
77fa06f3d9 Merge pull request #1695 from arrbee/fix-1695
API should not be ifdeffed
2013-07-09 17:20:36 -07:00
Vicent Martí
550cd2d776 Merge pull request #1716 from arrbee/fix-config-get-multivar
Fix git_config_get_multivar with interleaved missing entries
2013-07-09 16:54:34 -07:00
Russell Belfer
e4fda954d6 A little git_config_get_multivar code cleanup 2013-07-09 16:46:18 -07:00
Russell Belfer
7b5c0d1846 Add more tests for git_config_get_multivar
The old tests didn't try failing lookups or lookups across
multiple config files with some having the pattern and some
not having it.
2013-07-09 16:45:23 -07:00
J. David Ibáñez
07fba63e9e Fix return value in git_config_get_multivar
If there is not an error, the return value was always the return value
of the last call to file->get_multivar

With this commit GIT_ENOTFOUND is only returned if all the calls to
filge-get_multivar return GIT_ENOTFOUND.
2013-07-09 16:23:46 -07:00
Russell Belfer
290e147985 Add GIT_CAP_SSH if library was built with SSH
This also adds a test that actually calls git_libgit2_capabilities
and git_libgit2_version.
2013-07-09 16:17:41 -07:00
Russell Belfer
a4456929a8 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.
2013-07-09 16:16:24 -07:00
Russell Belfer
03d9b930ee Indent with tabs 2013-07-09 14:45:58 -07:00
Russell Belfer
3eae9467e5 Merge pull request #1710 from arrbee/fix-1710
Null byte in hunk header
2013-07-09 14:24:57 -07:00
Russell Belfer
5813bc2194 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.
2013-07-09 12:01:16 -07:00
Russell Belfer
a3c062dbf8 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.
2013-07-09 09:58:33 -07:00
Vicent Martí
42d1a1e502 Merge pull request #1715 from tiennou/const-signature
Make the git_signature `const` in the stash API.
2013-07-09 06:46:50 -07:00
Etienne Samson
2274993be5 Make the git_signature const in the stash API. 2013-07-09 12:52:25 +02:00
Russell Belfer
a5f9b5f8d8 Diff hunk context off by one on long lines
The diff hunk context string that is returned to xdiff need not
be NUL terminated because the xdiff code just copies the number of
bytes that you report directly into the output.  There was an off
by one in the diff driver code when the header context was longer
than the output buffer size, the output buffer length included
the NUL byte which was copied into the hunk header.

Fixes #1710
2013-07-05 16:59:38 -07:00
Russell Belfer
82cb8e236a Merge pull request #1692 from arrbee/fix-1692
Segmentation fault on git_clone
2013-07-05 10:52:24 -07:00
Etienne Samson
f6bd086335 Fix a probable leak. 2013-07-03 22:10:05 +02:00
Etienne Samson
219f318c05 Fix a crash if git_remote_set_cred_acquire_cb wasn't called before connecting.
Fixes #1700.
2013-07-03 22:10:05 +02:00
Russell Belfer
2a16914c35 Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option
This option serves no benefit now that the git_status_list API
is available.  It was of questionable value before and now it
would just be a bad idea to use it rather than the indexed API.
2013-07-03 12:20:34 -07:00
Russell Belfer
4ae29053d5 Merge pull request #1701 from yorah/fix/gh-1698
Fix segfault in git_status_foreach_ext()
2013-07-03 11:45:10 -07:00
Russell Belfer
178aa39cc2 Be more thread aware with some index updates
The index isn't really thread safe for the most part, but we can
easily be more careful and avoid double frees and the like, which
are serious problems (as opposed to a lookup which might return
the incorrect value but if the index in being updated, that is
much harder to avoid).
2013-07-03 11:42:43 -07:00
yorah
9b6075b25f Fix segfault in git_status_foreach_ext()
Add tests for the `GIT_STATUS_SHOW_XXX` flags.
2013-07-03 17:22:12 +02:00
Vicent Martí
6bb7bff274 Merge pull request #1696 from AndrejMitrovic/FixTypo
[trivial] Fix small typo in docs for git_repository_message.
2013-07-02 14:43:44 -07:00
Andrej Mitrovic
f8ccd6c935 Fix small typo in docs for git_repository_message. 2013-07-02 20:23:54 +02:00
Ben Straub
7c559c2528 Merge pull request #1694 from AndrejMitrovic/FixupDocEnums
[trivial] Fix docs to use proper enum names
2013-07-01 12:42:08 -07:00
Russell Belfer
55ededfd39 Make refspec_transform paranoid about arguments 2013-07-01 10:21:14 -07:00
Russell Belfer
278ce7468d Add helpful buffer shorten function 2013-07-01 10:20:38 -07:00
Andrej Mitrovic
0b170f4dcb Fix docs to use proper enum names that exist. 2013-07-01 00:56:54 +02:00
Vicent Martí
c61300eda9 Merge pull request #1690 from nulltoken/fix/warnings
Fix Win32/64 compilation warnings & memory leak
2013-06-29 07:34:03 -07:00
nulltoken
d90390c162 test: Fix memory leak 2013-06-29 13:38:27 +02:00
nulltoken
c4ac556ee7 Fix compilation warnings 2013-06-29 13:27:55 +02:00
Russell Belfer
f2c41884c3 Merge pull request #1688 from arrbee/submodule-load-ignore-orphaned-head
Test submodules with empty index or orphaned head
2013-06-27 22:48:46 -07:00
Russell Belfer
1e9dd60f14 Test submodules with empty index or orphaned head
In both of these cases, the submodule data should still be loaded
just (obviously) without the data that comes from either the index
or the HEAD.

This fixes a bug in the orphaned head case.
2013-06-27 22:29:05 -07:00
Russell Belfer
c8a39f9ee3 Merge pull request #1684 from libgit2/fix-dirty-submodule-diff
Dirty submodules do not correctly appear in diffs
2013-06-27 11:11:12 -07:00
Russell Belfer
c67ff958c4 Fix bug marking submodule diffs as unmodified
There was a bug where submodules whose HEAD had not been moved
were being marked as having an UNMODIFIED delta record instead
of being left MODIFIED.  This fixes that and fixes the tests to
notice if a submodule has been incorrectly marked as UNMODIFIED.
2013-06-27 07:38:27 -07:00
Justin Spahr-Summers
c7974b49d0 Fail on unmodified deltas when they're unexpected 2013-06-26 12:03:33 -07:00
Russell Belfer
b0401c6867 Merge pull request #1681 from arthurschreiber/patch-1
Prefer younger merge bases over older ones.
2013-06-25 16:36:50 -07:00
Arthur Schreiber
24ba6d3f8c Add a test case. 2013-06-25 22:55:13 +02:00
Russell Belfer
d0c36a0baf Merge pull request #1678 from arthurschreiber/unbreak-local-ls-after-disconnect
Unbreak git_remote_ls on a local transport after disconnecting.
2013-06-25 10:42:38 -07:00
Russell Belfer
22ef0c2857 Merge pull request #1680 from csware/win32-junction
Correctly handle win32 junctions
2013-06-25 09:40:10 -07:00
Arthur Schreiber
3736b64f05 Prefer younger merge bases over older ones.
git-core prefers younger merge bases over older ones in case that multiple valid merge bases exists.
2013-06-25 18:36:37 +02:00
Sven Strickroth
4753711235 Correctly handle junctions
A junction has S_IFDIR | S_IFLNK set, however, only one makes sense.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-06-25 16:46:06 +02:00
Sven Strickroth
022a45e084 Revert "Work around reparse point stat issues"
This reverts commit 32c12ea6a9.
2013-06-25 16:43:15 +02:00
Arthur Schreiber
9728cfde5f Make sure we don't leak memory again. 2013-06-25 11:17:55 +03:00
Arthur Schreiber
edbaa63a7c Unbreak git_remote_ls on a local transport after disconnecting. 2013-06-25 09:04:04 +02:00
Vicent Marti
eddc1f1ed7 libgit2 v0.19.0 "gut merge"
Minor point release! We got a lot of rather large features that we
wanted to get settled in:

- New (threadsafe) cache for objects
- Iterator for Status
- New Merge APIs
- SSH support on *NIX
- Function context on diff
- Namespaces support
- Index add/update/remove with wildcard support
- Iterator for References
- Fetch and push refspecs for Remotes
- Rename support in Status
- New 'sys/` namespace for external headers with low-level APIs

As always, this comes with hundreds of bug fixes and performance
improvements. We're faster and better than ever. And we haven't broken
many APIs this time!

Build stuff.
2013-06-25 00:14:45 +02:00