Commit Graph

9093 Commits

Author SHA1 Message Date
Edward Thomson
2f2129b1ce Merge pull request #3612 from arthurschreiber/arthur/fix-3173
Horrible fix for #3173.
2016-02-11 15:47:01 -08:00
Arthur Schreiber
3679ebaef5 Horrible fix for #3173. 2016-02-11 23:41:34 +01:00
Carlos Martín Nieto
460ae11f0a commit: don't forget the last header field
When we moved the logic to handle the first one, wrong loop logic was
kept in place which meant we still finished early. But we now notice it
because we're not reading past the last LF we find.

This was not noticed before as the last field in the tested commit was
multi-line which does not trigger the early break.
2016-02-11 22:19:20 +01:00
Carlos Martín Nieto
66ce08a66c Merge pull request #3607 from pks-t/pks/coverity-improvements
Coverity improvements for GITERR_CHECK_ALLOC
2016-02-11 22:16:34 +01:00
Edward Thomson
263e674ec6 merge tests: correct casts 2016-02-11 11:41:23 -08:00
Edward Thomson
ad8aa11288 reset test: fix initialization warning 2016-02-11 11:26:42 -08:00
Edward Thomson
a202e0d45b rebase: allow custom merge_options
Allow callers of rebase to specify custom merge options.  This may
allow custom conflict resolution, or failing fast when conflicts
are detected.
2016-02-11 10:49:25 -08:00
Edward Thomson
ee6673070a rebase: introduce inmemory rebasing
Introduce the ability to rebase in-memory or in a bare repository.

When `rebase_options.inmemory` is specified, the resultant `git_rebase`
session will not be persisted to disk.  Callers may still analyze
the rebase operations, resolve any conflicts against the in-memory
index and create the commits.  Neither `HEAD` nor the working
directory will be updated during this process.
2016-02-11 10:48:48 -08:00
Patrick Steinhardt
50174ab459 coverity: use https URL for posting build
When posting our instrumented build results to Coverity we have
to include sensitive information, in particular our authorization
token. Currently we use an unencrypted channel to post this
information, leading to the token being transferred in plain.

Fix this by using a secured connection instead.
2016-02-10 11:06:23 +01:00
Patrick Steinhardt
8dddea42aa coverity: provide nodef for GITERR_CHECK_ALLOC
Coverity currently lists a lot of errors with regard to
GITERR_CHECK_ALLOC causing resource leaks. We know this macro is
only invoked when we want to abort because we are out of memory.

Coverity allows for overriding the default model where we know
that certain functions guarantee a desired behavior. The
user_nodefs.h is used to override the behavior of macros.
Re-define GITERR_CHECK_ALLOC inside of it to specify its abort
nature.
2016-02-10 10:59:14 +01:00
Edward Thomson
82abd40d80 filter: clean up documentation around custom filters 2016-02-09 21:47:51 -08:00
Edward Thomson
494e61b8a3 win32: drop xp support in WideCharToMultiByte 2016-02-09 21:45:24 -08:00
Edward Thomson
9447b9e55a xplat: use st_mtimespec everywhere on mac 2016-02-09 10:40:33 -08:00
Vicent Marti
488e2b8505 Merge pull request #3599 from libgit2/gpgsign
Introduce git_commit_extract_signature
2016-02-09 16:26:58 +01:00
Carlos Martín Nieto
534cc5a3cb Merge pull request #3603 from pks-t/pks/coverity-fixes
Coverity fixes
2016-02-09 16:10:43 +01:00
Carlos Martín Nieto
a65afb757e Introduce git_commit_extract_signature
This returns the GPG signature for a commit and its contents without the
signature block, allowing for the verification of the commit's
signature.
2016-02-09 15:58:16 +01:00
Carlos Martín Nieto
ab87cb1818 Merge pull request #3602 from libgit2/cmn/header-field-2
commit: also match the first header field when searching
2016-02-09 14:53:10 +01:00
Patrick Steinhardt
24b8ed2b3a attr_file: fix resource leak 2016-02-09 11:11:38 +01:00
Patrick Steinhardt
e262545753 checkout: fix resource leak 2016-02-09 11:09:41 +01:00
Patrick Steinhardt
39c9dd24d3 pack-objects: fix memory leak in packbuilder_config 2016-02-09 10:53:30 +01:00
Patrick Steinhardt
0b2437bb68 pack-objects: fix memory leak in compute_write_order 2016-02-09 10:43:28 +01:00
Patrick Steinhardt
a53d2e3985 pack: do not free passed in poiter on error
The function `git_packfile_stream_open` tries to free the passed
in stream when an error occurs. The only call site is
`git_indexer_append`, though, which passes in the address of a
stream struct which has not been allocated on the heap.

Fix the issue by simply removing the call to free. In case of an
error we did not allocate any memory yet and otherwise it should
be the caller's responsibility to manage it's object's lifetime.
2016-02-09 09:58:56 +01:00
Carlos Martín Nieto
f55eca167c commit: also match the first header field when searching
We were searching only past the first header field, which meant we were
unable to find e.g. `tree` which is the first field.

While here, make sure to set an error message in case we cannot find the
field.
2016-02-09 07:17:26 +01:00
Carlos Martín Nieto
e0bbe78134 Merge pull request #3598 from pks-t/pks/coverity-fixes
Coverity fixes
2016-02-09 06:41:02 +01:00
Carlos Martín Nieto
463f53513f Merge pull request #3601 from ethomson/merge_doc
Better document `git_merge_commits` redux
2016-02-09 06:26:21 +01:00
Edward Thomson
b00c959f45 Better document git_merge_commits redux
`git_merge_commits` and `git_merge` now *do* handle recursive base
building for criss-cross merges.  Remove the documentation that says
that they do not.

This reverts commit 5e44d9bcb6.
2016-02-08 17:56:41 -08:00
Edward Thomson
7cdbb39e0a Merge pull request #3600 from ethomson/mailmap
mailmap: add ethomson@github.com
2016-02-08 17:14:43 -08:00
Edward Thomson
88a4d08448 mailmap: add ethomson@github.com 2016-02-08 17:13:52 -08:00
Edward Thomson
2ed855a9e8 filter: avoid races during filter registration
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).
2016-02-08 16:31:42 -08:00
Edward Thomson
6e0fc1a631 mingw: use gcc-like memory barrier
Use the gcc-like memory barrier (__sync_synchronize) on mingw.
2016-02-08 16:30:41 -08:00
Edward Thomson
8a6d667763 global: make openssl registration like the rest 2016-02-08 16:30:39 -08:00
Edward Thomson
bad2702c43 global: refactor setup and cleanup
Move the common initialization and cleanup methods to reduce
unnecessary duplication.
2016-02-08 15:39:26 -08:00
Patrick Steinhardt
a001846b25 curl_stream: fix unused cert infos
When copying contents of the cURL certiinfo we duplicate the
data but forget to actually put it into the vector.
2016-02-08 17:05:57 +01:00
Patrick Steinhardt
fac42ff942 merge: fix memory leak 2016-02-08 16:58:08 +01:00
Carlos Martín Nieto
0f814deb36 Merge pull request #3592 from ethomson/code_of_conduct
Introduce Contributor Covenant
2016-02-06 16:41:59 -08:00
Carlos Martín Nieto
240b6fed00 Merge pull request #3578 from bubaflub/fix_small_memory_leak
Free allocated pointer to curl stream on error
2016-02-05 15:19:24 -08:00
Edward Thomson
efa8208c73 Merge pull request #3579 from ethomson/mingw_winhttp
winhttp: name mangle class / iid on mingw
2016-02-05 09:37:40 -08:00
Edward Thomson
45165b1208 Merge pull request #3584 from jbreeden/export_fn
Export git_stash_apply_init_options
2016-02-04 16:43:23 -08:00
Edward Thomson
d8f7215928 Merge pull request #3594 from Ephemera/patch-1
Fix typo
2016-02-04 15:49:00 -08:00
Ephemera
804bcd6b95 Fix typo 2016-02-05 01:59:07 +09:00
Edward Thomson
612f2a6095 Merge pull request #3593 from nvanheuverzwijn/patch-1
Fix a typo in documentation
2016-02-04 08:43:47 -08:00
Nicolas Vanheuverzwijn
1087e6be88 Fix a typo in documentation 2016-02-03 17:27:04 -05:00
Edward Thomson
846632cdfe Introduce Contributor Covenant 2016-02-02 14:58:13 -08:00
Marius Ungureanu
0c09753cf5 Fix the build when defining USE_NSEC 2016-01-25 14:06:15 +02:00
jbreeden
d02720d8a6 Export git_stash_apply_init_options 2016-01-23 17:13:25 -08:00
Edward Thomson
5c7f2f0188 winhttp: name mangle class / iid on mingw
Standard Windows type systems define CLSID_InternetSecurityManager
and IID_IInternetSecurityManager, but MinGW lacks these definitions.
As a result, we must hardcode these definitions ourselves.  However,
we should not use a public struct with those names, lest another
library do the same thing and consumers cannot link to both.
2016-01-19 11:13:23 -06:00
Bob Kuo
8bd1c19e76 Free allocated pointer to curl stream on error 2016-01-16 19:39:24 -06:00
Carlos Martín Nieto
0f9d15493d Merge pull request #3573 from pmq20/master-12jan16
Make packfile_unpack_compressed a private API
2016-01-16 02:29:17 +01:00
Carlos Martín Nieto
47cf739e97 Merge pull request #3569 from arthurschreiber/arthur/fix-windows-issues
Fix some issues with generated pkg-config file
2016-01-13 17:57:54 +01:00
P.S.V.R
b644e223aa Make packfile_unpack_compressed a private API 2016-01-13 11:02:38 +08:00