Commit Graph

5254 Commits

Author SHA1 Message Date
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
Vicent Marti
c0e58e430b test-rename: This is not a decimal, silly 2013-06-25 00:12:19 +02:00
Russell Belfer
5b4a70836a Merge pull request #1675 from arthurschreiber/fix-leak-in-local-transport
Fix a leak in the local transport code.
2013-06-24 14:43:33 -07:00
Vicent Martí
12212258ec Merge pull request #1674 from arrbee/fix-checkout-target-dir-win32
Fix checkout tests on Windows
2013-06-24 12:02:43 -07:00
Arthur Schreiber
8c510b8313 Fix a leak in the local transport code. 2013-06-24 21:02:42 +02:00
Russell Belfer
f3f4c6b5be Fix checkout tests on Windows 2013-06-24 11:56:35 -07:00
Vicent Martí
353a90bedb Merge pull request #1672 from TheRealKerni/fix/header_docs
Fixed most documentation header bugs
2013-06-24 11:21:54 -07:00
Vicent Martí
09ee60c6d4 Merge pull request #1670 from arrbee/open-cloexec
Add O_CLOEXEC to open calls
2013-06-24 11:21:09 -07:00
Vicent Martí
6c4dadba45 Merge pull request #1669 from arrbee/fix-index-add-bypath
In loose objects backend, constrain mkdir calls to avoid extra mkdirs
2013-06-24 11:20:57 -07:00
Russell Belfer
32c12ea6a9 Work around reparse point stat issues
In theory, p_stat should never return an S_ISLNK result, but due
to the current implementation on Windows with mount points it is
possible that it will.  For now, work around that by allowing a
link in the path to a directory being created.  If it is really a
problem, then the issue will be caught on the next iteration of
the loop, but typically this will be the right thing to do.
2013-06-24 09:19:24 -07:00
Andreas Linde
e196716457 Fixed most documentation header bugs
Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode.

The following warnings have not been fixed:
common.h:213 - Not sure how the documentation format is for '...'
notes.h:102 - Correct @param name but empty text
notes.h:111 - Correct @param name but empty text
pack.h:140 - @return missing text
pack.h:148 - @return missing text
2013-06-24 15:33:41 +02:00
Russell Belfer
3d3ea4dc56 Add O_CLOEXEC to open calls 2013-06-22 20:58:32 -07:00