summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pack: don't allow a negative offsetcmn/idx-extra-checkCarlos Martín Nieto2016-02-251-0/+5
|
* pack: make sure we don't go out of bounds for extended entriesCarlos Martín Nieto2016-02-251-1/+13
| | | | | | A corrupt index might have data that tells us to go look past the end of the file for data. Catch these cases and return an appropriate error message.
* Merge pull request #3631 from ethomson/giterr_fixupsCarlos Martín Nieto2016-02-232-6/+1
|\ | | | | Minor `giterr` fixups
| * giterr_set_str: remove `GITERR_OS` documentationEdward Thomson2016-02-231-5/+0
| | | | | | | | | | The `giterr_set_str` does not actually honor `GITERR_OS`. Remove the documentation that claims that we do.
| * map: use `giterr_set` internallyEdward Thomson2016-02-231-1/+1
|/ | | | | | Use the `giterr_set` function, which actually supports `GITERR_OS`. The `giterr_set_str` function is exposed for external users and will not append the operating system's error message.
* Merge pull request #3629 from ethomson/set_user_agent_docVicent Marti2016-02-233-0/+15
|\ | | | | git_libgit2_opts: minor documentation & usage fixes
| * git_libgit2_opts: validate keyEdward Thomson2016-02-222-0/+9
| |
| * git_libgit2_opts: document GIT_OPT_SET_USER_AGENTEdward Thomson2016-02-221-0/+6
|/
* Merge pull request #3627 from libgit2/cmn/typoEdward Thomson2016-02-222-3/+3
|\ | | | | Fix a few checkout -> rebase typos
| * Fix a few checkout -> rebase typoscmn/typoCarlos Martín Nieto2016-02-222-3/+3
|/
* openssl: re-export the last-resort locking functionv0.24.0-rc1cmn/init-sshCarlos Martín Nieto2016-02-191-0/+1
| | | | | We need to include the header where we define the function. Otherwise it won't be available on the DLL.
* CHANGELOG: add a few missing changesCarlos Martín Nieto2016-02-191-1/+22
|
* openssl: free the context even if we don't connectCarlos Martín Nieto2016-02-191-1/+1
|
* global: remove an unused variableCarlos Martín Nieto2016-02-191-8/+0
|
* Merge pull request #3597 from ethomson/filter_registrationCarlos Martín Nieto2016-02-197-304/+370
|\ | | | | Filter registration
| * filter: clean up documentation around custom filtersEdward Thomson2016-02-091-25/+34
| |
| * filter: avoid races during filter registrationEdward Thomson2016-02-082-124/+157
| | | | | | | | | | | | | | Previously we would set the global filter registry structure before adding filters to the structure, without a lock, which is quite racy. Now, register default filters during global registration and use an rwlock to read and write the filter registry (as appopriate).
| * mingw: use gcc-like memory barrierEdward Thomson2016-02-081-1/+1
| | | | | | | | Use the gcc-like memory barrier (__sync_synchronize) on mingw.
| * global: make openssl registration like the restEdward Thomson2016-02-083-115/+128
| |
| * global: refactor setup and cleanupEdward Thomson2016-02-081-59/+70
| | | | | | | | | | Move the common initialization and cleanup methods to reduce unnecessary duplication.
* | Merge pull request #3614 from pks-t/pks/coverity-fixesCarlos Martín Nieto2016-02-195-3/+30
|\ \ | | | | | | Coverity fixes
| * | netops: fix memory leak when an error occursPatrick Steinhardt2016-02-181-0/+4
| | |
| * | transports: smart_pkt: fix memory leaksPatrick Steinhardt2016-02-181-0/+3
| | |
| * | transports: smart: fix memory leak on OOM pathPatrick Steinhardt2016-02-181-0/+2
| | |
| * | signature: use GITERR_CHECK_ALLOC to check for OOM situationPatrick Steinhardt2016-02-181-3/+2
| | | | | | | | | | | | | | | | | | | | | When checking for out of memory situations we usually use the GITERR_CHECK_ALLOC macro. Besides conforming to our current code base it adds the benefit of silencing errors in Coverity due to Coverity handling the macro's error path as abort.
| * | coverity: hint that string length is at least 2Patrick Steinhardt2016-02-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking if a string is prefixed by a drive letter (e.g. "C:") we verify this by inspecting the first and second character of the string. Coverity thinks this is a defect as we do not check the string's length first, but in fact we only check the second character if the first character is part of the alphabet, that is it cannot be '\0'. Fix this by overriding the macro and explicitly checking the string's length.
| * | coverity: add nodefs for abort macrosPatrick Steinhardt2016-02-181-0/+17
|/ / | | | | | | | | | | | | Add nodefs for macros that abort the current flow due to errors. This includes macros that trigger on integer overflows and for the version check macro. This aids Coverity as we point out that these paths will cause a fatal error.
* | Merge pull request #3604 from ethomson/nsec_xplatCarlos Martín Nieto2016-02-183-7/+7
|\ \ | | | | | | Handle `USE_NSECS`
| * | xplat: use st_mtimespec everywhere on macEdward Thomson2016-02-092-6/+6
| | |
| * | Fix the build when defining USE_NSECMarius Ungureanu2016-01-251-1/+1
| | |
* | | Merge pull request #3606 from ethomson/drop_xpCarlos Martín Nieto2016-02-181-18/+3
|\ \ \ | | | | | | | | win32: drop xp support in WideCharToMultiByte
| * | | win32: drop xp support in WideCharToMultiByteEdward Thomson2016-02-091-18/+3
| | | |
* | | | Merge pull request #3613 from ethomson/fixupsCarlos Martín Nieto2016-02-1816-48/+114
|\ \ \ \ | | | | | | | | | | Remove most of the silly warnings
| * | | | winhttp: use an unsigned iteratorEdward Thomson2016-02-161-1/+1
| | | | |
| * | | | submodule: explicitly cast to the teensy time valueEdward Thomson2016-02-161-2/+2
| | | | |
| * | | | index: explicitly cast the teeny index entry membersEdward Thomson2016-02-161-3/+3
| | | | |
| * | | | index: don't use `seek` return as an error codeEdward Thomson2016-02-161-2/+2
| | | | |
| * | | | index: explicitly cast new hash size to an intEdward Thomson2016-02-161-1/+1
| | | | |
| * | | | win32: drop incorrect `const`nessEdward Thomson2016-02-161-1/+1
| | | | |
| * | | | fstat: use our custom `stat`Edward Thomson2016-02-163-12/+62
| | | | |
| * | | | tree: zap warnings around `size_t` vs `uint16_t`Edward Thomson2016-02-161-10/+16
| | | | |
| * | | | win32: introduce p_timeval that isn't stupidEdward Thomson2016-02-1210-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.
| * | | | merge tests: correct castsEdward Thomson2016-02-111-3/+3
| | | | |
| * | | | reset test: fix initialization warningEdward Thomson2016-02-111-1/+1
| |/ / /
* | | | Merge pull request #3619 from ethomson/win32_forbiddenCarlos Martín Nieto2016-02-1820-26/+267
|\ \ \ \ | | | | | | | | | | win32: allow us to read indexes with forbidden paths on win32
| * | | | index: allow read of index w/ illegal entriesEdward Thomson2016-02-176-23/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow `git_index_read` to handle reading existing indexes with illegal entries. Allow the low-level `git_index_add` to add properly formed `git_index_entry`s even if they contain paths that would be illegal for the current filesystem (eg, `AUX`). Continue to disallow `git_index_add_bypath` from adding entries that are illegal universally illegal (eg, `.git`, `foo/../bar`).
| * | | | iterator: assert tree_iterator has a frameEdward Thomson2016-02-171-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although a `tree_iterator` that failed to be properly created does not have a frame, all other `tree_iterator`s should. Do not call `pop` in the failure case, but assert that in all other cases there is a frame.
| * | | | Validate pointer before access the member.Colin Xu2016-02-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Git repository at network locations, sometimes git_iterator_for_tree fails at iterator__update_ignore_case so it goes to git_iterator_free. Null pointer will crash the process if not check. Signed-off-by: Colin Xu <colin.xu@gmail.com>
| * | | | win32: tests around handling forbidden pathsEdward Thomson2016-02-1713-0/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a repository that contains some paths that were illegal on PC-DOS circa 1981 (like `aux`, `con`, `com1`) and that in a bizarre fit of retrocomputing, remain illegal on some "modern" computers, despite being "new technology". Introduce some aspirational tests that suggest that we should be able to cope with trees and indexes that contain paths that would be illegal on the filesystem, so that we can at least diff them. Further ensure that checkout will not write a repository with forbidden paths.
* | | | | Merge pull request #3621 from pra85/patch-1Carlos Martín Nieto2016-02-181-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix a typo