Commit Graph

3167 Commits

Author SHA1 Message Date
nulltoken
316659489a refs: introduce git_reference_peel()
Fix #530
2012-09-06 18:40:05 +02:00
Michael Schubert
0e9f2fcef6 odb: mark unused variable 2012-09-06 11:35:09 +02:00
Vicent Martí
7a3fc9fb17 Merge pull request #900 from pwkelley/development
Expose a malloc function to 3rd party ODB backends
2012-09-06 01:17:23 -07:00
Vicent Martí
4e2b8b4cdc Merge pull request #912 from schu/netops-ssl-error
netops: be more careful with SSL errors
2012-09-06 01:15:14 -07:00
Vicent Marti
01ae1909c5 diff: Cleanup documentation and printf compat 2012-09-06 10:13:38 +02:00
Vicent Marti
2e4a9ea9cf Merge remote-tracking branch 'arrbee/diff-iterator' into development 2012-09-06 10:08:14 +02:00
Russell Belfer
27730eefb9 Merge pull request #917 from arrbee/test-issue-835
Test for gitmodules only submodule def
2012-09-05 16:31:44 -07:00
Russell Belfer
fed886d990 Test for gitmodules only submodule def
This should confirm that issue #835 is fixed where a submodule that
is only declared in the .gitmodules file was not accessible via the
submodule APIs.
2012-09-05 15:54:32 -07:00
Russell Belfer
510f1bac6b Fix comments and a minor bug
This adds better header comments and also fixes a bug in one of
simple APIs that tells the number of lines in the current hunk.
2012-09-05 15:17:24 -07:00
Russell Belfer
f335ecd6e1 Diff iterators
This refactors the diff output code so that an iterator object
can be used to traverse and generate the diffs, instead of just
the `foreach()` style with callbacks.  The code has been rearranged
so that the two styles can still share most functions.

This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses
that as a common error code for marking the end of iteration when
using a iterator style of object.
2012-09-05 15:17:24 -07:00
Vicent Martí
4d3834038b Merge pull request #856 from libgit2/utf8-win
Windows: Perform UTF-8 path conversion on the Stack
2012-09-04 14:19:24 -07:00
Vicent Marti
c9d223f0de branch: Add missing include 2012-09-04 22:57:31 +02:00
Carlos Martín Nieto
f9988d4e4c odb: pass the user's data pointer correctly in foreach 2012-09-04 21:42:00 +02:00
Carlos Martín Nieto
064ee42d99 travis: use a valgrind suppressions file
We don't care about the supposed zlib errors, and the leak from
giterr_set isn't interesting, as it gets freed each time an error is
set.

Give valgrind a suppressions file so it doesn't tell us about them.
2012-09-04 16:00:49 +02:00
Vicent Marti
925be045d5 clar: Clear errors on shutdown 2012-09-04 15:40:28 +02:00
authmillenon
0e2dd29ba5 Fix logical error in git_index_set_caps 2012-09-04 12:12:48 +02:00
Vicent Martí
af6bcd8b93 Merge pull request #913 from nulltoken/fix/warnings
Fix MSVC compilation warnings
2012-09-04 01:06:34 -07:00
nulltoken
b97c169ec0 Fix MSVC compilation warnings 2012-09-04 10:01:18 +02:00
Michael Schubert
65ac67fbbd netops: be more careful with SSL errors
SSL_get_error() allows to receive a result code for various SSL
operations. Depending on the return value (see man (3) SSL_get_error)
there might be additional information in the OpenSSL error queue. Return
the queued message if available, otherwise set an error message
corresponding to the return code.
2012-09-04 00:22:12 +02:00
Michael Schubert
4deda91bda netops: continue writing on SSL_ERROR_WANT_WRITE 2012-09-04 00:14:16 +02:00
Ben Straub
22e1b4b8a8 Ignore tags file 2012-08-30 07:55:36 -07:00
Russell Belfer
04d4fe5ef0 Merge pull request #908 from nulltoken/bug/repo_reinit_init
repository: add failing repo initialization test
2012-08-29 11:01:46 -07:00
nulltoken
89cd5708d9 repository: make initialization cope with missing core.worktree 2012-08-29 19:56:55 +02:00
Vicent Marti
0f4c61754b Add bounds checking to UTF-8 conversion 2012-08-28 23:26:00 -07:00
Vicent Marti
6813169ac9 windows: Keep UTF-8 on the stack yo 2012-08-28 23:09:43 -07:00
Vicent Martí
3b73a03497 UTF-8 changes yo 2012-08-28 23:09:42 -07:00
Vicent Martí
319ad0ba20 Merge pull request #905 from carlosmn/signature-now
signature: make the OS give us the offset for git_signature_now
2012-08-28 13:55:55 -07:00
Michael Schubert
0844ed069e Fix parentheses warning 2012-08-28 20:22:44 +02:00
Carlos Martín Nieto
d03d309b10 signature: make the OS give us the offset for git_signature_now
There is a better and less fragile way to calculate time offsets. Let
the OS take care of dealing with DST and simply take the the offset
between the local time and UTC that it gives us.
2012-08-28 18:02:12 +02:00
Carlos Martín Nieto
0d5dce268d ssl: make cert check ignore work for invalid certs, not just CNs
Passing SSL_VERIFY_PEER makes OpenSSL shut down the connection if the
certificate is invalid, without giving us a chance to ignore that
error. Pass SSL_VERIFY_NONE and call SSL_get_verify_result if the user
wanted us to check.

When no CNs match, we used to jump to on_error which gave a bogus
error as that's for OpenSSL errors. Jump to cert_fail so we tell the
user that the error came from checking the certificate.
2012-08-28 15:39:06 +02:00
Vicent Marti
62eafd0620 Merge branch 'branch-delete-ref' into development
Conflicts:
	include/git2/refs.h
2012-08-27 14:54:52 -07:00
Vicent Martí
bd2887a5e5 Merge pull request #904 from arrbee/better-object-peel
Make git_object_peel a bit smarter
2012-08-27 14:52:26 -07:00
Vicent Martí
b9d283d14a Merge pull request #897 from nulltoken/topic/git_reference_check_format
refs: expose git_reference_normalize_name()
2012-08-27 13:39:17 -07:00
Vicent Martí
05752700c7 Merge pull request #899 from schu/revwalk-push
revwalk: refuse push of non-commit objects
2012-08-27 13:35:58 -07:00
Russell Belfer
d8057a5b0e Make git_object_peel a bit smarter
This expands the types of peeling that `git_object_peel` knows
how to do to include TAG -> BLOB peeling, and makes the errors
slightly more consistent depending on the situation.  It also
adds a new special behavior where peeling to ANY will peel until
the object type changes (e.g. chases TAGs to a non-TAG).

Using this expanded peeling, this replaces peeling code that was
embedded in `git_tag_peel` and `git_reset`.
2012-08-27 11:53:59 -07:00
Russell Belfer
0b9174c621 Merge pull request #903 from nulltoken/topic/peeling-duplication
branch: reduce code duplication
2012-08-27 11:45:48 -07:00
Philip Kelley
c49d328cf4 Expose a malloc function to 3rd party ODB backends 2012-08-27 09:59:13 -04:00
nulltoken
d1445b7528 branch: reduce code duplication 2012-08-27 15:38:38 +02:00
Michael Schubert
4e323ef0a8 revwalk: refuse push of non-commit objects
Check the type of the pushed object immediately instead of starting the
walk and failing in between.
2012-08-27 11:52:32 +02:00
nulltoken
2e0c881670 refs: expose git_reference_normalize_name() 2012-08-27 08:41:26 +02:00
Vicent Marti
1c947daa80 branch: Change git_branch_delete to take a ref 2012-08-26 18:00:10 -07:00
Vicent Marti
17f7bde2f7 posix: Always set a default mapping mode 2012-08-26 18:00:10 -07:00
Carlos Martín Nieto
2b175ca972 indexer: kill git_indexer_stats.data_received
It's not really needed with the current code as we have EOS and the
sideband's flush to tell us we're done.

Keep the distinction between processed and received objects.
2012-08-26 00:42:28 +02:00
Carlos Martín Nieto
cc1d85d1da http: increase buffer side to deal with side-band-64k
This poor transport was forgotten in the recent sideband support.
2012-08-25 23:32:19 +02:00
Carlos Martín Nieto
7a57ae5478 indexer: don't segfault when freeing an unused indexer
Make sure that idx->pack isn't NULL before trying to free resources
under it.
2012-08-25 23:31:29 +02:00
Vicent Martí
8238401ccb Merge pull request #896 from ben/revparse-ambiguous
Revparse: GIT_EAMBIGUOUS
2012-08-25 11:37:23 -07:00
Ben Straub
c9de8611d6 Revparse: GIT_EAMBIGUOUS
Revparse now returns EAMBIGUOUS if the the spec
doesn't match any refs/tags, and is <4 characters.
2012-08-25 09:56:20 -07:00
Vicent Martí
b7e8827b8b Merge pull request #895 from carlosmn/sideband
Add sideband support
2012-08-24 16:29:01 -07:00
Vicent Martí
09fad50696 Merge pull request #852 from arrbee/submodule-extensions
Submodule extensions
2012-08-24 15:45:13 -07:00
Vicent Martí
091c742af9 Merge pull request #876 from arrbee/new-config-locations
new config file locations and defaults
2012-08-24 15:43:19 -07:00