Commit Graph

7909 Commits

Author SHA1 Message Date
Edward Thomson
a212716fc3 diff_tform: don't compare empty hashsig_heaps
Don't try to compare two empty hashsig_heaps.
2015-03-03 18:19:42 -05:00
Edward Thomson
9ce97782b4 Merge pull request #2941 from libgit2/cmn/http-enforce-cred
http: enforce the credential types
2015-03-03 17:59:44 -05:00
Edward Thomson
f438dbe191 Merge pull request #2771 from libgit2/cmn/config-borrow-entry
Borrowing configuration entries
2015-03-03 17:59:20 -05:00
Jeff Hostetler
d8be508777 Change ifdef for MINGW32. 2015-03-03 13:35:10 -05:00
Carlos Martín Nieto
9a97f49e3a config: borrow refcounted references
This changes the get_entry() method to return a refcounted version of
the config entry, which you have to free when you're done.

This allows us to avoid freeing the memory in which the entry is stored
on a refresh, which may happen at any time for a live config.

For this reason, get_string() has been forbidden on live configs and a
new function get_string_buf() has been added, which stores the string in
a git_buf which the user then owns.

The functions which parse the string value takea advantage of the
borrowing to parse safely and then release the entry.
2015-03-03 18:35:12 +01:00
Carlos Martín Nieto
e892b6a927 http: enforce the credential types
The user may decide to return any type of credential, including ones we
did not say we support. Add a check to make sure the user returned an
object of the right type and error out if not.
2015-03-03 18:07:16 +01:00
Carlos Martín Nieto
76f034180a Remove swp files 2015-03-03 17:04:38 +01:00
Edward Thomson
20273e4d3c Merge pull request #2934 from akikoskinen/mingw_build_fix
Fix build on mingw (master branch)
2015-03-03 10:08:51 -05:00
Edward Thomson
018fdbb580 Merge pull request #2913 from ethomson/stash_fixup
stash: correctly stash wd modified/index deleted
2015-03-03 10:08:28 -05:00
Edward Thomson
72ca65d538 Merge pull request #2808 from libgit2/cmn/repo-ident
Remove the signature from ref-modifying functions
2015-03-03 10:07:36 -05:00
Jeff Hostetler
e5cf1c704c Converted cl_perf_timer to use git__timer internally. 2015-03-03 09:57:50 -05:00
Jeff Hostetler
7e9b21aa2a Fix p_ftruncate to handle big files for git_clone 2015-03-03 08:47:44 -05:00
Carlos Martín Nieto
41513659de Update CHANGELOG with the reflog ident changes 2015-03-03 14:40:51 +01:00
Carlos Martín Nieto
4e498646b6 repository: remove log message override for switching the active branch
We want to use the "checkout: moving from ..." message in order to let
git know when a change of branch has happened. Make the convenience
functions for this goal write this message.
2015-03-03 14:40:50 +01:00
Carlos Martín Nieto
412a380888 push: remove reflog message override
We always use "update by push".
2015-03-03 14:40:50 +01:00
Carlos Martín Nieto
6bfb990dc7 branch: don't accept a reflog message override
This namespace is about behaving like git's branch command, so let's do
exactly that instead of taking a reflog message.

This override is still available via the reference namespace.
2015-03-03 14:40:50 +01:00
Carlos Martín Nieto
23a17803b6 reset: remove reflog message override
This function is meant to simulate what git does in the reset command,
so we should include the reflog message in that.
2015-03-03 14:40:50 +01:00
Carlos Martín Nieto
659cf2029f Remove the signature from ref-modifying functions
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.

In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
2015-03-03 14:40:50 +01:00
Carlos Martín Nieto
fe477951be Merge pull request #2885 from JIghtuse/master
describe example: function to add commits to opts
2015-03-03 14:35:10 +01:00
Carlos Martín Nieto
99b68a2aec Merge pull request #2908 from ethomson/safe_create
Allow checkout to handle newly cloned repositories, remove `GIT_CHECKOUT_SAFE_CREATE`
2015-03-03 13:47:13 +01:00
Carlos Martín Nieto
31bc6c0440 branch: do capture the error code
We want to ignore GIT_ENOTFOUND, but for that we need to capture the
error code from the reflog deletion.
2015-03-03 13:25:40 +01:00
Carlos Martín Nieto
5ac2b7cb2a Merge pull request #2937 from git-up/branch_delete_reflog
git_branch_delete() should ignore errors from non-existing reflogs
2015-03-03 13:03:54 +01:00
Carlos Martín Nieto
bf410446dd Merge pull request #2935 from ethomson/dll_patchlevel
win32: add the patch level to the .dll fileversion
2015-03-02 21:03:57 +01:00
Pierre-Olivier Latour
7986391719 git_branch_delete() should ignore errors from non-existing reflogs 2015-03-02 10:24:54 -08:00
Edward Thomson
bf1476f190 win32: add the patch level to the .dll fileversion
Win32 DLLs have four fields for the version number (major, minor,
teeny, patch).  If a consumer wants to build a custom DLL, it may
be useful to set the patchlevel version number in the DLL.

This value only affects the DLL version number, it does not affect
the resultant "version number", which remains major.minor.teeny.
2015-03-02 10:35:26 -05:00
Jeff Hostetler
9a859ef55a Added cl_perf_timer. Updated global trace to include timers. 2015-03-02 09:21:55 -05:00
Jeff Hostetler
f096fbf4d6 Cleanup formatting of clar trace messages. 2015-03-02 08:34:02 -05:00
Jeff Hostetler
6b5c0886b6 Provide mechanism to let CLAR globally setup git_trace() 2015-03-02 08:20:27 -05:00
Aki Koskinen
45df2237bf Include ws2tcpip.h in order to get in6_addr
It's currently required in src/openssl_stream.c only.
2015-03-02 11:15:32 +02:00
Aki Koskinen
ec03244227 Include openssl headers last
Windows headers #define some names that openssl uses too. Openssl
headers #undef the offending names before reusing them. But if those
offending Windows headers get included after the openssl headers the
namespace is polluted and nothing good happens.

Fixes issue #2850.
2015-03-02 11:15:13 +02:00
Aki Koskinen
a944c6cc40 Don't include headers on windows that aren't available
This mainly concerns mingw build.
2015-03-02 11:14:07 +02:00
Carlos Martín Nieto
c23002c560 Merge pull request #2929 from ethomson/clar_update
Update to clar 2b73f5e
2015-03-01 21:04:51 +01:00
Carlos Martín Nieto
18fcb5c813 Merge pull request #2928 from ethomson/rebase_alloc_check
rebase: check alloc result
2015-03-01 21:00:11 +01:00
Edward Thomson
496b76d415 checkout tests: just use SAFE where appropriate 2015-02-27 13:50:48 -05:00
Edward Thomson
96b82b11c6 checkout: remove GIT_CHECKOUT_SAFE_CREATE as a strategy 2015-02-27 13:50:44 -05:00
Edward Thomson
14fec0aea3 example: drop SAFE_CREATE from clone example 2015-02-27 13:50:40 -05:00
Edward Thomson
6c9e86adaf clone: drop now unnecessary SAFE_CREATE 2015-02-27 13:50:36 -05:00
Edward Thomson
e6da3e4496 checkout: upgrade to SAFE_CREATE when no index file
When the repository does not contain an index, emulate git's behavior
and upgrade to `SAFE_CREATE`.  This allows us to check out repositories
created with `git clone --no-checkout`.
2015-02-27 13:50:32 -05:00
Edward Thomson
5cbe950fb8 merge perf test: drop unnecessary SAFE_CREATE 2015-02-27 13:47:34 -05:00
Edward Thomson
094cfc2904 cherrypick, revert: drop unnecessary SAFE_CREATE 2015-02-27 13:47:30 -05:00
Edward Thomson
fb2f3a76aa Merge pull request #2922 from ethomson/more_explaining_threads_is_more_better
README: provide some more explanation about TLS
2015-02-27 00:37:20 -05:00
Edward Thomson
cfcb346d94 Update to clar 2b73f5e 2015-02-27 00:30:50 -05:00
Edward Thomson
3cbaa5872c rebase: check alloc result 2015-02-27 04:39:54 +00:00
Damien PROFETA
a275fbc0f7 Add API to add a memory buffer to an index
git_index_add_frombuffer enables now to store a memory buffer in the odb
and to store an entry in the index directly if the index is attached to a
repository.
2015-02-25 10:24:13 +01:00
Edward Thomson
ecf1c3c358 README: provide some more explanation about TLS 2015-02-23 11:19:32 -05:00
Carlos Martín Nieto
366e53d3da Merge pull request #2921 from libgit2/ntk/macosx_build_cherrypicked
Fix MAX 32 bit build problem described in libgit2/libgit2#2917
2015-02-20 19:40:45 +01:00
Jeff Hostetler
c92987d157 Fix MAX 32 bit build problem described in libgit2/libgit2#2917 2015-02-20 18:59:43 +01:00
Carlos Martín Nieto
5091aff782 Merge pull request #2907 from jasonhaslam/git_packfile_unpack_race
Fix race in git_packfile_unpack.
2015-02-20 08:40:40 +01:00
Carlos Martín Nieto
d15884ce84 Merge pull request #2911 from ethomson/streaming_filters
Streaming filters
2015-02-19 20:39:20 +01:00
Edward Thomson
feb0e02286 tests: separate INVASIVE filesystem tests
Introduce GITTEST_INVASIVE_FS_STRUCTURE for things that are invasive
to your filesystem structure (like creating folders at your filesystem
root) and GITTEST_INVASIVE_FS_SIZE for things that write lots of data.
2015-02-19 12:14:06 -05:00