src


Log

Author Commit Date CI Message
Edward Thomson 274f0b93 2015-07-15T09:17:35 Merge pull request #3311 from Fallso/MacroRedefinition Fix macro redefinition warning
Fallso cec3569f 2015-07-14T15:33:56 Fix macro redefinition warning
Carlos Martín Nieto ceb58739 2015-07-13T18:50:39 Merge pull request #3302 from libgit2/cmn/submodule-foreach-diff-path List a submodule only once when the path matches a submodule in the index
Carlos Martín Nieto f861abad 2015-07-12T19:56:19 Merge branch 'portable-zu'
Matthew Plough 768f8be3 2015-06-30T19:00:41 Fix #3094 - improve use of portable size_t/ssize_t format specifiers. The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
Carlos Martín Nieto 08c2d3e9 2015-07-11T18:31:28 submodule: lookup the submodule by path if available If we get the path from the gitmodules file, look up the submodule we're interested in by path, rather then by name. Otherwise we might get duplicate results.
Carlos Martín Nieto 1cd96016 2015-07-10T19:32:04 Merge pull request #3301 from ethomson/warnings Clean up some warnings
Carlos Martín Nieto a1687f78 2015-07-10T19:07:41 Merge pull request #3297 from tkelman/patch-2 Fix undefined reference with old versions of openssl
Edward Thomson 9c033102 2015-06-30T13:41:01 khash: add eol so picky compilers stop warning
Edward Thomson a3c00cd8 2015-07-10T09:21:59 xdiff: cleanup some warnings
Edward Thomson 79698030 2015-06-29T22:51:18 git_cert: child types use proper base type
Carlos Martín Nieto 9847d80d 2015-07-09T18:21:31 Merge pull request #3281 from ethomson/wildcard_filters filters: custom filters with wildcard attributes
Edward Thomson 234ca40a 2015-07-07T16:46:48 xdiff: upgrade to core git 2.4.5 Upgrade xdiff to version used in core git 2.4.5 (0df0541). Corrects an issue where an LF is added at EOF while applying an unrelated change (ba31180), cleans up some unused code (be89977 and e5b0662), and provides an improved callback to avoid leaking internal (to xdiff) structures (467d348). This also adds some additional functionality that we do not yet take advantage of, namely the ability to ignore changes whose lines are all blank (36617af).
Tony Kelman febc8c46 2015-07-07T06:55:05 Fix undefined reference with old versions of openssl Versions prior to 0.9.8f did not have this function, rhel/centos5 are still on a heavily backported version of 0.9.8e and theoretically supported until March 2017 Without this ifdef, I get the following link failure: ``` CMakeFiles/libgit2_clar.dir/src/openssl_stream.c.o: In function `openssl_connect': openssl_stream.c:(.text+0x45a): undefined reference to `SSL_set_tlsext_host_name' collect2: error: ld returned 1 exit status make[6]: *** [libgit2_clar] Error 1 ```
Carlos Martín Nieto 3704ac35 2015-07-07T12:38:47 Merge pull request #3277 from git-up/git_diff_index_to_index Added git_diff_index_to_index()
Carlos Martín Nieto ea445e06 2015-07-07T00:48:17 Merge pull request #3288 from ethomson/getenv git__getenv: utf-8 aware env reader
Carlos Martín Nieto 3c831113 2015-07-06T19:04:48 Merge pull request #3202 from jeffhostetler/windows_stack_trace Stacktraces with CRTDBG memory leaks on Windows
Edward Thomson e069c621 2015-07-02T09:25:48 git__getenv: utf-8 aware env reader Introduce `git__getenv` which is a UTF-8 aware `getenv` everywhere. Make `cl_getenv` use this to keep consistent memory handling around return values (free everywhere, as opposed to only some platforms).
Edward Thomson dd6b24b1 2015-07-02T10:36:15 iterator_walk: cast away constness for free
Carlos Martín Nieto e0af3cb3 2015-07-01T21:15:06 submodule: correctly delimit the keys to use for lookup The regex we use to look at the gitmodules file does not correctly delimit the name of submodule which we want to look up and puts '.*' straight after the name, maching on any submodule which has the seeked submodule as a prefix of its name. Add the missing '\.' in the regex so we want a full stop to exist both before and after the submodule name.
Edward Thomson 63924435 2015-07-01T09:40:11 filters: custom filters with wildcard attributes Allow custom filters with wildcard attributes, so that clients can support some random `filter=foo` in a .gitattributes and look up the corresponding smudge/clean commands in the configuration file.
Linquize 526f91f5 2015-07-01T14:58:13 Fix 8.3 filename tests failure when 8.3 is disabled
Matthew Plough 9126ccac 2015-06-30T16:48:47 Fix #3093 - remove declaration of unused function git_fetch__download_pack Function was added in commit 2c982daa2eec64b80c7940bfe1142295bd72edd8 on October 5, 2011, and removed in commit 41fb1ca0ec51ad1d2a14b911aab3215e42965d1b on October 29, 2012. Given the length of time it's gone unused, it's safe to remove now.
Carlos Martín Nieto 2f60073d 2015-06-30T21:40:20 Merge pull request #3273 from ethomson/warnings3 More warnings
Pierre-Olivier Latour ccef5adb 2015-06-30T09:30:20 Added git_diff_index_to_index()
Pierre-Olivier Latour 1630981e 2015-06-30T09:03:23 http: fixed leak when asking for credentials again t->cred might have been allocated the previous time and needs to be freed before asking caller for credentials again.
Edward Thomson 0305721c 2015-06-30T14:23:41 winhttp: remove unused var
Edward Thomson 69c8bf7e 2015-06-30T14:21:29 posix compat: include sys/stat.h for mingw
Edward Thomson 49840056 2015-06-30T14:20:31 diff: use size_t format
Edward Thomson 3451c871 2015-06-30T09:29:41 Merge pull request #3271 from jeffhostetler/more_leaks memory leak refspec.c
Jeff Hostetler 64e6b5b0 2015-06-29T17:32:22 fix memory leak in refspec.c on errors.
Carlos Martín Nieto 7bfdd1c2 2015-06-30T10:21:06 Merge pull request #3270 from ethomson/warnings2 Remove some warnings
Edward Thomson e5f9df7b 2015-06-29T21:45:04 odb: cast to long long for printf
Edward Thomson 60655056 2015-06-29T21:37:07 submodule: cast enum to int for compare
Edward Thomson 3ca84ac0 2015-06-29T20:29:29 openssl: free hostname
Edward Thomson 149d5d8a 2015-06-29T15:17:58 stash: drop unused variable
Edward Thomson ded4ccab 2015-06-29T15:16:22 iterator_walk: drop unused variable
Jeff Hostetler 827b954e 2015-06-28T06:56:02 Reserve aux_id 0; sort leaks by aux_id. Fix cmp.
Jeff Hostetler 93b42728 2015-06-09T14:38:30 Include stacktrace summary in memory leak output.
Carlos Martín Nieto 8b380060 2015-06-29T21:12:44 http: don't give up on auth on the first try When the server rejects an authentication request, ask the caller for the credentials again, instead of giving up on the first try.
Carlos Martín Nieto c28a5c97 2015-06-29T21:10:47 submodule: remove trailing slashes from submodule paths We allow looking up a submodule by path, but we lost the path normalisation during the recent changes. Bring it back.
Carlos Martín Nieto cf4030b0 2015-06-29T20:54:17 submodule: remove some obsolete logic Remove some of the logic that was left-over from the time we had a cache of submodules, plugging a leak of the submodule object in certain cases.
Carlos Martín Nieto fa399750 2015-06-27T21:26:27 Merge pull request #3265 from libgit2/leaks Plug a bunch of leaks
Carlos Martín Nieto 24fa21f3 2015-06-26T18:59:53 index, iterator, fetchhead: plug leaks
Carlos Martín Nieto 9568660f 2015-06-26T18:31:39 diff: fix leaks in diff printing
Carlos Martín Nieto cfafeb84 2015-06-26T18:11:05 Merge pull request #3263 from git-up/fixes Fixes
Carlos Martín Nieto 354268ca 2015-06-26T17:46:35 Merge pull request #3259 from ethomson/stash_apply_argh Stash apply: stage new files even when not updating the index
Pierre-Olivier Latour cae2a555 2015-06-26T08:17:56 Fixed build failure if GIT_CURL is not defined
Vicent Marti 3d9ef2dc 2015-06-26T16:45:42 Revert "object: correct the expected ID size in prefix lookup" This reverts commit 969d4b703c910a8fd045baafbcd243b4c9825316. This was a fluke from Coverity. The length to all the APIs in the library is supposed to be passed in as nibbles, not bytes. Passing it as bytes would prevent us from parsing uneven-sized SHA1 strings. Also, the rest of the library was still using nibbles (including revparse and the odb_prefix APIs), so this change was seriously breaking things in unexpected ways. ^^
Pierre-Olivier Latour c2e1b058 2015-06-05T18:26:49 Only write index if updated when passing GIT_DIFF_UPDATE_INDEX When diffing the index with the workdir and GIT_DIFF_UPDATE_INDEX has been passed, the previous implementation was always writing the index to disk even if it wasn't modified.
Edward Thomson c0280bdd 2015-06-25T18:55:48 Merge pull request #3255 from libgit2/cmn/rename-unspecified Rename FALLBACK to UNSPECIFIED
Edward Thomson b7f5cb8d 2015-06-20T19:33:15 stash: stage new files when unstashing them Files that were new (staged additions) in the stash tree should be staged when unstashing, even when not applying the index.
Edward Thomson 8960dc1e 2015-06-24T18:10:30 iterator: provide git_iterator_walk Provide `git_iterator_walk` to walk each iterator in lockstep, returning each iterator's idea of the contents of the next path.
Edward Thomson 82b1c93d 2015-06-20T13:44:22 stash: don't allow apply with staged changes
Edward Thomson 3b66c6a3 2015-06-25T15:36:53 Merge pull request #3256 from libgit2/cmn/fetch-spec-fetchhead remote: insert refspecs with no rhs in FETCH_HEAD
Edward Thomson 87987fd1 2015-06-25T15:26:43 Merge pull request #3246 from libgit2/cmn/dont-grow-borrowed Don't allow growing borrowed buffers
Carlos Martín Nieto 23aa7c90 2015-06-25T13:40:38 remote: insert refspecs with no rhs in FETCH_HEAD When a refspec contains no rhs and thus won't cause an explicit update, we skip all the logic, but that means that we don't update FETCH_HEAD with it, which is what the implicit rhs is. Add another bit of logic which puts those remote heads in the list of updates so we put them into FETCH_HEAD.
Carlos Martín Nieto c2418f46 2015-06-25T12:48:44 Rename FALLBACK to UNSPECIFIED Fallback describes the mechanism, while unspecified explains what the user is thinking.
Carlos Martín Nieto a6599235 2015-06-24T19:32:56 buffer: make use of EINVALID for growing a borrowed buffer This explains more closely what happens. While here, set an error message.
Carlos Martín Nieto caab22c0 2015-06-23T15:41:58 buffer: don't allow growing borrowed buffers When we don't own a buffer (asize=0) we currently allow the usage of grow to copy the memory into a buffer we do own. This muddles the meaning of grow, and lets us be a bit cavalier with ownership semantics. Don't allow this any more. Usage of grow should be restricted to buffers which we know own their own memory. If unsure, we must not attempt to modify it.
Carlos Martín Nieto daacf96d 2015-06-24T23:34:40 Merge pull request #3097 from libgit2/cmn/submodule-config-state Remove run-time configuration settings from submodules
Carlos Martín Nieto e1f434f8 2015-06-24T23:33:46 Merge pull request #3183 from libgit2/cmn/curl-stream Implement a cURL stream
Carlos Martín Nieto 9d5efab8 2015-06-24T21:13:23 Merge pull request #3254 from ethomson/diff-binary-patch Handle binary DIFFABLEness properly
Carlos Martín Nieto c2f274c6 2015-06-24T19:47:34 Merge pull request #3250 from ethomson/stash Stash workdir correctly when added in the index, modified in the workdir
Edward Thomson 54077091 2015-06-24T12:06:41 diff: determine DIFFABLE-ness for binaries Always set `GIT_DIFF_PATCH_DIFFABLE` for all files, regardless of binary-ness, so that the binary callback is invoked to either show the binary contents, or just print the standard "Binary files differ" message. We may need to do deeper inspection for binary files where we have avoided loading the contents into a file map.
Carlos Martín Nieto 58ca8c7e 2015-06-24T17:27:16 SecureTransport: use the curl stream if available If the libcurl stream is available, use that as the underlying stream instead of the socket stream. This allows us to set a proxy for HTTPS connections.
Carlos Martín Nieto 8443f492 2015-06-11T16:57:04 curl: remove the encrypted param to the constructor We do not want libcurl to perform the TLS negotiation for us, so we don't need to pass this option.
Carlos Martín Nieto f97d5d09 2015-06-11T16:54:48 http: ask for the curl stream for non-encrypted connections The TLS streams talk over the curl stream themselves, so we don't need to ask for it explicitly. Do so in the case of the non-encrypted one so we can still make use proxies in that case.
Carlos Martín Nieto e247649d 2015-06-11T16:50:44 openssl: use the curl stream if available When linking against libcurl, use it as the underlying transport instead of straight sockets. We can't quite just give over the file descriptor, as curl puts it into non-blocking mode, so we build a custom BIO so OpenSSL sends the data through our stream, be it the socket or curl streams.
Carlos Martín Nieto cdee630f 2015-06-09T19:07:58 curl: extract certificate information The information is exposed by curl for some crypto libraries in the form of name:content strings. We can't do much more than return this information.
Carlos Martín Nieto 8762d721 2015-06-07T14:51:10 http: set the proxy if the stream supports it Of the built-in ones, only cURL support it, but there's no reason a user-provided stream wouldn't support it.
Carlos Martín Nieto 1376e784 2015-06-07T14:42:13 stream: add support for setting a proxy If the stream claims to support this feature, we can let the transport set the proxy. We also set HTTPPROXYTUNNEL option so curl can create a tunnel through the proxy which lets us create our own TLS session (if needed).
Carlos Martín Nieto 8dea1c21 2015-06-05T11:02:11 Implement a curl stream cURL has a mode in which it acts a lot like our streams, providing send and recv functions and taking care of the TLS and proxy setup for us. Implement a new stream which uses libcurl instead of raw sockets or the TLS libraries directly. This version does not support reporting certificates or proxies yet.
Pierre-Olivier Latour 6a8f3fa8 2015-06-23T20:59:03 Fixed invalid error handling in git_repository_open_ext()
Edward Thomson cc605e73 2015-06-23T23:52:03 Merge pull request #3222 from git-up/conflicted Fixed GIT_DELTA_CONFLICTED not returned in some cases
Edward Thomson bd670abd 2015-06-23T23:30:58 Merge pull request #3226 from libgit2/cmn/racy-diff-again racy-git, the missing link
Edward Thomson 90177111 2015-06-23T16:27:33 stash: save the workdir file when deleted in index When stashing the workdir tree, examine the index as well. Using a mechanism similar to `git_diff_tree_to_workdir_with_index` allows us to determine that a file was added in the index and subsequently modified in the working directory. Without examining the index, we would erroneously believe that this file was untracked and fail to include it in the working directory tree. Use a slightly modified `git_diff_tree_to_workdir_with_index` in order to avoid some of the behavior custom to `git diff`. In particular, be sure to include the working directory side of a file when it was deleted in the index.
Edward Thomson 5ef43d41 2015-06-23T10:29:59 git_diff__merge: allow pluggable diff merges
Edward Thomson 83ba5e36 2015-06-22T18:43:13 diff_tform: remove reversed copy of delta merger Drop `git_diff__merge_like_cgit_reversed`, since it's a copy and paste mess of slightly incompatible changes.
Carlos Martín Nieto 16c73d38 2015-06-23T20:44:27 repository: check the format version This is something we do on re-init but not when opening a repository. This hasn't particularly mattered up to now as the version has been 0 ever since the first release of git, but the times, they're a-changing and we will soon see version 1 in the wild. We need to make sure we don't open those.
Carlos Martín Nieto 99e11cdd 2015-06-23T20:43:49 repository: don't error out if there is no version git will assume the repository format version is 0 if the value is not there. Do the same.
Pierre-Olivier Latour 8d8a2eef 2015-06-15T11:14:40 Fixed GIT_DELTA_CONFLICTED not returned in some cases If an index entry for a file that is not in HEAD is in conflicted state, when diffing HEAD with the index, the status field of the corresponding git_diff_delta was incorrectly reported as GIT_DELTA_ADDED instead of GIT_DELTA_CONFLICTED. This was due to handle_unmatched_new_item() initially setting the status to GIT_DELTA_CONFLICTED but then overriding it later with GIT_DELTA_ADDED.
Pierre-Olivier Latour cb63e7e8 2015-06-17T08:55:09 Explicitly handle GIT_DELTA_CONFLICTED in git_diff_merge() This fixes a bug where if a file was in conflicted state in either diff, it would not always remain in conflicted state in the merged diff.
Edward Thomson 146d0d08 2015-06-09T00:42:28 crlf: give Unix the glory of autocrlf=true Perform LF->CRLF for core.autocrlf=true on non-Win32 because core git does.
Edward Thomson 8293c8f9 2015-06-08T13:51:28 git_buf_text_lf_to_crlf: allow mixed line endings Allow files to have mixed line endings instead of skipping processing on them.
Edward Thomson 47e9a6cb 2015-06-08T15:58:54 crlf: use statistics to control to workdir filter Use statistics (like core git) to control the behavior of the to workdir CRLF filter.
Edward Thomson 0b6ed4f9 2015-06-22T11:24:20 Merge pull request #3240 from libgit2/cmn/commit-header-field commit: allow retrieving an arbitrary header field
Carlos Martín Nieto c4e3a3db 2015-05-09T11:22:57 submodule: handle writing out all enum values for settings We currently do not handle those enum values which require us to set "true" or unset variables in all cases. Use a common function which does understand this by looking at our mapping directly.
Carlos Martín Nieto 15c38103 2015-05-09T11:22:27 config: provide a function to reverse-lookup mapped cvars
Carlos Martín Nieto 961861fa 2015-05-05T09:25:17 submodule: get rid of `_save()` We no longer have any setters which affect an instance, so `git_submodule_save()` is no longer relevant.
Carlos Martín Nieto d6073b30 2015-05-05T09:22:35 submodule: make `_set_url()` affect the configuration With this one, we can get rid of the edit_and_save test.
Carlos Martín Nieto 486ba4cd 2015-05-05T09:13:52 submodule: make `_set_branch()` affect the configuration
Carlos Martín Nieto 4e636423 2015-05-05T09:01:20 submodule: make `_set_update_fetch_recurse_submodules()` affect the config Similarly to the other ones. In this test we copy over testing `RECURSE_YES` which shows an error in our handling of the `YES` variant which we may have to port to the rest.
Carlos Martín Nieto e8a39f8e 2015-05-05T08:35:29 submodule: make `_set_update()` affect the configuration Moving on with the removal of runtime-changing variables, the update setting for a remote is whatever it was when it was looked up.
Carlos Martín Nieto 2278637c 2015-05-05T06:14:40 submodule: correct detection of existing submodules During the cache deletion, the check for whether we consider a submodule to exist got changed regarding submodules which are in the worktree but not configured. Instead of checking for the url field to be populated, check the location where we've found it.
Carlos Martín Nieto d769a3fd 2015-05-05T06:03:21 submodule: bring back finding by path During the removal of the cache, we also removed the ability to use `_lookup()` to search by path rather than name. Bring this logic back.
Carlos Martín Nieto c6f489c9 2015-05-04T17:29:12 submodule: add an ignore option to status This lets us specify in the status call which ignore rules we want to use (optionally falling back to whatever the submodule has in its configuration). This removes one of the reasons for having `_set_ignore()` set the value in-memory. We re-use the `IGNORE_RESET` value for this as it is no longer relevant but has a similar purpose to `IGNORE_FALLBACK`. Similarly, we remove `IGNORE_DEFAULT` which does not have use outside of initializers and move that to fall back to the configuration as well.
Carlos Martín Nieto 64bbd47a 2015-05-04T17:09:21 submodule: don't let status change an existing instance As submodules are becomes more like values, we should not let a status check to update its properties. Instead of taking a submodule, have status take a repo and submodule name.
Carlos Martín Nieto 5a9fc6c8 2015-05-04T16:22:56 submodule: make set_ignore() affect the configuration Instead of affecting a particular instance, make it change the configuration.
Carlos Martín Nieto dfda2f68 2015-04-27T19:27:29 submodule: remove the per-repo cache Having this cache and giving them out goes against our multithreading guarantees and it makes it impossible to use submodules in a multi-threaded environment, as any thread can ask for a refresh which may reallocate some string in the submodule struct which we've accessed in a different one via a getter. This makes the submodules behave more like remotes, where each object is created upon request and not shared except explicitly by the user. This means that some tests won't pass yet, as they assume they can affect the submodule objects in the cache and that will affect later operations.