Commit Graph

5044 Commits

Author SHA1 Message Date
Russell Belfer
03d9b930ee Indent with tabs 2013-07-09 14:45:58 -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
Russell Belfer
82cb8e236a Merge pull request #1692 from arrbee/fix-1692
Segmentation fault on git_clone
2013-07-05 10:52:24 -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
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
Russell Belfer
9f1b2c5cb7 Merge pull request #1668 from csware/WC_ERR_INVALID_CHARS
Do not redefine WC_ERR_INVALID_CHARS
2013-06-22 17:22:03 -07:00
Russell Belfer
8294e8cfff Constrain mkdir calls to avoid extra mkdirs
This updates the calls that make the subdirectories for objects
to use a base directory above which git_futils_mkdir won't walk
any higher.  This prevents attempts to mkdir all the way up to
the root of the filesystem.

Also, this moves the objects_dir into the loose backend structure
and removes the separate allocation, plus does some preformatting
of the objects_dir value to guarantee a trailing slash, etc.
2013-06-22 17:15:31 -07:00
Sven Strickroth
a7ea40955e Do not redefine WC_ERR_INVALID_CHARS
WC_ERR_INVALID_CHARS might be already defined by the Windows SDK.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-06-23 01:25:34 +02:00
Vicent Martí
5d669f0a96 Merge pull request #1665 from arrbee/checkout-target-directory
Add target directory to checkout options
2013-06-21 14:29:21 -07:00
Russell Belfer
d4f98ba4f1 Addition checkout target directory tests
This adds additonal tests of the checkout target directory option
including using it to dump data from bare repos.
2013-06-21 12:29:03 -07:00
Russell Belfer
6a15e8d23a Loosen ensure_not_bare rules in checkout
With the new target directory option to checkout, the non-bareness
of the repository should be checked much later in the parameter
validation process - actually that check was already in place, but
I was doing it redundantly in the checkout APIs.

This removes the now unnecessary early check for bare repos.  It
also adds some other parameter validation and makes it so that
implied parameters can actually be passed as NULL (i.e. if you
pass a git_index, you don't have to pass the git_repository - we
can get it from index).
2013-06-21 12:26:36 -07:00
Russell Belfer
9094ae5a3c Add target directory to checkout
This adds the ability for checkout to write to a target directory
instead of having to use the working directory of the repository.
This makes it easier to do exports of repository data and the like.

This is similar to, but not quite the same as, the --prefix option
to `git checkout-index` (this will always be treated as a directory
name, not just as a simple text prefix).

As part of this, the workdir iterator was extended to take the
path to the working directory as a parameter and fallback on the
git_repository_workdir result only if it's not specified.

Fixes #1332
2013-06-21 11:55:13 -07:00
Vicent Martí
00197c34d6 Merge pull request #1664 from arrbee/checkout-deleted-with-fix
Checkout should not recreate deleted files - with fix
2013-06-21 11:41:40 -07:00
Russell Belfer
36fd9e3065 Fix checkout of modified file when missing from wd
This fixes the checkout case when a file is modified between the
baseline and the target and yet missing in the working directory.
The logic for that case appears to have been wrong.

This also adds a useful checkout notify callback to the checkout
test helpers that will count notifications and also has a debug
mode to visualize what checkout thinks that it's doing.
2013-06-21 11:20:54 -07:00