src


Log

Author Commit Date CI Message
Etienne Samson ca9bbcb5 2018-06-19T20:15:02 blame: check error code when loading the mailmap Reported by Coverity, CID 1393484
Edward Thomson f4633791 2018-07-06T12:36:05 Merge pull request #4687 from tiennou/fix/4672 patch_parse: populate line numbers while parsing diffs
Patrick Steinhardt f2a1cece 2018-07-06T11:25:47 Merge pull request #4686 from tiennou/fix/more-worktree-from-bare Fix git_worktree_validate failing on bare repositories
Patrick Steinhardt 8a00de08 2018-07-06T10:47:06 Merge pull request #4699 from nelhage/fetch-null-dst git_refspec_transform: Handle NULL dst
Edward Thomson c43658f6 2018-06-30T13:24:23 Merge pull request #4536 from libgit2/ethomson/index_dirty Add a "dirty" state to the index when it has unsaved changes
Edward Thomson bfa1f022 2018-06-22T19:17:08 settings: optional unsaved index safety Add the `GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY` option, which will cause commands that reload the on-disk index to fail if the current `git_index` has changed that have not been saved. This will prevent users from - for example - adding a file to the index then calling a function like `git_checkout` and having that file be silently removed from the index since it was re-read from disk. Now calls that would re-read the index will fail if the index is "dirty", meaning changes have been made to it but have not been written. Users can either `git_index_read` to discard those changes explicitly, or `git_index_write` to write them.
Edward Thomson 787768c2 2018-06-22T19:07:54 index: return a unique error code on dirty index When the index is dirty, return GIT_EINDEXDIRTY so that consumers can identify the exact problem programatically.
Edward Thomson 5e26391a 2018-06-18T18:28:08 checkout: FORCE doesn't halt on dirty index If the index is dirty, allow `GIT_CHECKOUT_FORCE` to obliterate unsaved changes. This is in keeping with its name and description.
Edward Thomson b242cdbf 2017-11-17T00:19:07 index: commit the changes to the index properly Now that the index has a "dirty" state, where it has changes that have not yet been committed or rolled back, our tests need to be adapted to actually commit or rollback the changes instead of assuming that the index can be operated on in its indeterminate state.
Edward Thomson 7c56c49b 2017-11-12T08:09:35 index: add a dirty bit reflecting unsaved changes Teach the index when it is "dirty", and has unsaved changes. Consider the index dirty whenever a caller has added or removed an entry from the main index, REUC or NAME section, including when the index is completely cleared. Similarly, consider the index _not_ dirty immediately after it is written, or when it is read from the on-disk index. This allows us to ensure that unsaved changes are not lost when we automatically refresh the index.
Edward Thomson 4919e495 2018-02-18T23:55:56 stash: use _an_ index not _the_ index Don't manipulate the repository's index during stash; instead, manipulate a temporary index and check it out. This allows us to use the checkout mechanism to update the workdir and the repository's index, and allows checkout to use its common mechanisms to write data and handle errors.
Etienne Samson 1da6329f 2018-06-29T14:39:17 worktree: don't return "untyped" negative numbers as error codes
Etienne Samson 292a6eca 2018-06-29T14:39:16 worktree: skip building a buffer when validating
Etienne Samson 83c35f7e 2018-06-29T14:39:11 tests: worktree/bare: fix git_worktree_validate
Edward Thomson 68e73791 2018-06-29T12:52:35 Merge pull request #4709 from pks-t/pks/refspec-dispose refspec: rename `git_refspec__free` to `git_refspec__dispose`
Patrick Steinhardt 01574d40 2018-06-29T11:28:17 Merge pull request #4701 from nikital/master streams: openssl: Handle error in SSL_CTX_new
Patrick Steinhardt af3088e4 2018-06-29T11:45:15 refspec: rename `git_refspec__free` to `git_refspec__dispose` Since commit 630a67366 (refspec: add public parsing api, 2018-02-07), we now have two functions `git_refspec_free` and `git_refspec__free`. The difference is that the first one will free the structure itself, while the second one will only free the structure's contents. Use our new `dispose` naming pattern for the latter function to help avoid confusion.
Patrick Steinhardt 7192e26f 2018-06-29T09:43:33 Merge pull request #4519 from cynecx/refspec-parsing refspec: add public parsing api
Edward Thomson 967da2c7 2018-06-27T17:30:12 Merge pull request #4688 from mystor/sorted_revwalk_reset Fix interaction between limited flag and sorting over resets
Edward Thomson 12232a5e 2018-06-27T17:19:37 Merge pull request #4698 from nelhage/fix-leaks Fix assorted leaks found via fuzzing
Edward Thomson 88b30f51 2017-11-12T20:50:00 checkout: always set the index in checkout data Always set the `index` in the `checkout_data`, even in the case that we are not reloading the index. Other functionality in checkout examines the index (for example: determining whether the workdir is modified) and we need it even in the (uncommon) case that we are not reloading.
Edward Thomson 5dd34702 2018-06-26T09:56:43 Merge branch 'nelhage/smart-no-pack'
Edward Thomson 9286e413 2018-06-26T09:56:06 smart protocol: correct error message capitalization
Nikita Leshenko 05d89e72 2018-06-25T17:30:04 streams: openssl: Handle error in SSL_CTX_new SIGSEGV otherwise...
Nelson Elhage 3a547417 2018-06-25T15:38:29 git_pkt_free: Allow freeing NULL
Patrick Steinhardt e6cdd17c 2018-06-25T13:57:19 Merge pull request #4695 from nelhage/git_pkt-type-confusion Fix type confusion in git_smart__connect
Patrick Steinhardt 983f72c5 2018-06-25T13:52:25 Merge pull request #4696 from nelhage/git_pkt_ref-check-len Verify ref_pkt's are long enough
Nelson Elhage 786c6470 2018-06-25T02:05:21 git_refspec_transform: Handle NULL dst
Nelson Elhage d58afb17 2018-06-24T22:28:37 git_smart__connect: free symrefs on error
Nelson Elhage cf335928 2018-06-24T22:22:40 git_smart__update_heads: free the old symref_target
Nelson Elhage e31c450b 2018-06-24T23:46:36 Fix another missing git_pkt_free
Nelson Elhage bf4c2c57 2018-06-24T21:56:51 wait_while_ack: use git_pkt_free git__free is insufficient if the packet is a git_pkt_ref or another type that requires freeing referenced structures.
Nelson Elhage 437ee5a7 2018-06-24T19:47:08 Verify ref_pkt's are long enough If the remote sends a too-short packet, we'll allow `len` to go negative and eventually issue a malloc for <= 0 bytes on ``` pkt->head.name = git__malloc(alloclen); ```
Nelson Elhage 0098d746 2018-06-24T06:51:31 Fix type confusion in git_smart__connect Nothing verifies that t->refs[0] is a GIT_PKT_REF. A remote can send another packet type, ultimately resulting in a type confusion in `git_smart__detect_caps`
Nelson Elhage 3eec73ae 2018-06-24T20:54:41 PACK packets are illegal while downloading refs
Nika Layzell 4fd81c53 2018-06-18T19:43:53 Clear revwalk sorting when resetting Currently we fail to clear the sorting flag for revwalks when resetting. This caused a poor interaction with the limited flag during a recent patch. This patch clears the revwalk sorting flag and causes it to no longer persist over resets.
cynecx 630a6736 2018-02-07T22:30:27 refspec: add public parsing api Fix typo Fix some type issues More fixes Address requested changes Add test Fix naming Fix condition and tests Address requested changes Fix typo
Patrick Steinhardt e1e90dcc 2018-01-09T14:52:34 config_file: avoid free'ing OOM buffers Buffers which ran out of memory will never have any memory attached to them. As such, it is not necessary to call `git_buf_free` if the buffer is out of memory.
Patrick Steinhardt 83b5f161 2017-11-12T14:09:24 config_parse: always sanitize out-parameters in `parse_variable` The `parse_variable` function has two out parameters `var_name` and `var_value`. Currently, those are not being sanitized to `NULL`. when. any error happens inside of the `parse_variable` function. Fix that. While at it, the coding style is improved to match our usual coding practices more closely.
Patrick Steinhardt e51e29e8 2017-11-12T13:59:47 config_parse: have `git_config_parse` own entry value and name The function `git_config_parse` uses several callbacks to pass data along to the caller as it parses the file. One design shortcoming here is that strings passed to those callbacks are expected to be freed by them, which is really confusing. Fix the issue by changing memory ownership here. Instead of expecting the `on_variable` callbacks to free memory for `git_config_parse`, just do it inside of `git_config_parse`. While this obviously requires a bit more memory allocation churn due to having to copy both name and value at some places, this shouldn't be too much of a burden.
Etienne Samson f9e28026 2018-06-18T20:37:18 patch_parse: populate line numbers while parsing diffs
Edward Thomson e212011b 2018-06-18T12:33:34 Merge pull request #4685 from csware/no-git_buf_free Fix last references to deprecated git_buf_free
Edward Thomson cc9c9522 2018-06-18T12:10:17 Merge pull request #4606 from libgit2/cmn/revwalk-iteration revwalk: avoid walking the entire history when output is unsorted
Sven Strickroth b5818dda 2018-06-18T13:05:08 Fix last references to deprecated git_buf_free Signed-off-by: Sven Strickroth <email@cs-ware.de>
Edward Thomson ff98fec0 2018-06-18T10:25:07 revwalk: formatting updates
Edward Thomson 96882f20 2018-06-18T10:13:11 Merge pull request #4586 from emilio/mailmap Add mailmap support.
Nika Layzell f98131be 2018-06-17T00:40:25 Require the length argument to git_mailmap_from_buffer and make mailmap_add_buffer internal
Edward Thomson 0ecf0e33 2018-06-16T09:35:10 Merge pull request #4683 from pks-t/pks/tree-unused-functions tree: remove unused functions
Patrick Steinhardt f0a1d76a 2018-06-15T13:21:59 tree: remove unused function `git_tree__prefix_position`
Patrick Steinhardt 31f6b529 2018-06-15T13:21:08 tree: remove unused function `git_tree_entry_icmp`
Patrick Steinhardt 678fa45b 2018-06-15T11:34:04 Merge pull request #4678 from staticfloat/sf/mbedtls_linkage Link `mbedTLS` libraries in when `SHA1_BACKEND` == "mbedTLS"
Nika Layzell 9faf36a6 2018-06-14T22:48:58 mailmap: git_buf_free => git_buf_dispose
Nika Layzell d91d2968 2018-06-14T16:49:48 mailmap: Hide EEXISTS to simplify git_mailmap_add_entry callers
Nika Layzell c1a85ae2 2018-06-04T11:36:44 mailmap: Free the mailmap vector
Nika Layzell 56303e1a 2018-05-07T11:59:00 mailmap: API and style cleanup
Nika Layzell 8ff0504d 2018-04-08T03:01:14 mailmap: Rewrite API to support accurate mailmap resolution
Nika Layzell 18ff9bab 2018-03-27T22:48:03 mailmap: API and style cleanup
Nika Layzell 57cfeab9 2018-03-26T15:05:37 mailmap: Switch mailmap parsing to use the git_parse module
Nika Layzell 4ff44be8 2018-03-17T18:24:15 mailmap: Fix more bugs which snuck in when I rebased
Nika Layzell e3dcaca5 2018-03-17T18:15:01 mailmap: Integrate mailmaps with blame and signatures
Nika Layzell b05fbba3 2018-03-17T18:14:31 mailmap: Make everything a bit more style conforming
Emilio Cobos Álvarez 7bafd175 2018-03-18T01:39:57 mailmap: Don't error out when there's junk at the end of the line Also matches git.
Emilio Cobos Álvarez 59fbf9cf 2018-03-17T18:29:34 mailmap: Don't return a freed pointer, even if we return an error code
Emilio Cobos Álvarez 97bc8988 2018-03-17T17:40:24 mailmap: Do not error out when the mailmap contains an invalid line This matches git.
Emilio Cobos Álvarez 44112db2 2018-03-17T17:34:42 mailmap: Be consistent about checking len vs. len > 0 Not that it matters much anyway but...
Emilio Cobos Álvarez ae5ee182 2018-03-17T17:33:48 mailmap: git_vector_get already checks bounds
Nika Layzell ae222136 2018-03-17T02:33:48 mailmap: Some more style cleanup
Nika Layzell 49620359 2018-03-17T02:29:41 mailmap: Clean up mailmap parser, and finish API
Emilio Cobos Álvarez 7a169390 2018-03-15T16:34:30 mailmap: WIP mailmap support
Edward Thomson 3be73011 2018-06-11T18:26:22 Merge pull request #4436 from pks-t/pks/packfile-stream-free pack: rename `git_packfile_stream_free`
staticfloat@gmail.com b89162af 2018-06-10T17:26:08 Link `mbedTLS` libraries in when `SHA1_BACKEND == "mbedTLS"`
staticfloat@gmail.com 90c6fb0f 2018-06-10T17:33:06 Fix typo in adding `hash_mbedtls.c` to `SRC_SHA1`
Patrick Steinhardt ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Patrick Steinhardt 56ffdfc6 2018-02-08T11:14:30 buffer: deprecate `git_buf_free` in favor of `git_buf_dispose`
Patrick Steinhardt c8ee5270 2017-12-08T09:05:58 pack: rename `git_packfile_stream_free` The function `git_packfile_stream_free` frees all state of the packfile stream without freeing the structure itself. This naming makes it hard to spot whether it will try to free the pointer itself or not, causing potential future errors. Due to this reason, we have decided to name a function freeing state without freeing the actual struture a "dispose" function. Rename `git_packfile_stream_free` to `git_packfile_stream_dispose` as a first example following this rule.
Edward Thomson 795a5b28 2018-06-09T18:36:21 Merge pull request #4668 from novalis/bad-stash Fix stash save bug with fast path index check
Edward Thomson 44788c96 2018-06-09T18:00:23 Merge pull request #4662 from pks-t/pks/gitfile-api path: unify `git_path_is_*` APIs
Edward Thomson bc0f3227 2018-06-09T17:59:46 Merge pull request #4670 from pks-t/pks/ignore-leadingdir Fix negative gitignore rules with leading directories
Patrick Steinhardt 74b7ddbf 2018-03-16T10:14:50 settings: allow swapping out memory allocator Tie in the newly created infrastructure for swapping out memory allocators into our settings code. A user can now simply use the new option "GIT_OPT_SET_ALLOCATOR" with `git_libgit2_opts`, passing in an already initialized allocator structure as vararg.
Patrick Steinhardt 9865cd16 2018-03-20T14:23:49 alloc: make memory allocators use function pointers Currently, our memory allocators are being redirected to the correct implementation at compile time by simply using macros. In order to make them swappable at runtime, this commit reshuffles that by instead making use of a global "git_allocator" structure, whose pointers are set up to reference the allocator functions. Like this, it becomes easy to swap out allocators by simply setting these function pointers. In order to initialize a "git_allocator", our provided allocators "stdalloc" and "crtdbg" both provide an init function. This is being called to initialize a passed in allocator struct and set up its members correctly. No support is yet included to enable users of libgit2 to switch out the memory allocator at a global level.
Patrick Steinhardt 08b318c0 2018-03-14T10:43:00 stdalloc: extend allocators by file and line Our desired architecture would make allocators completely pluggable, such that users of libgit2 can swap out memory allocators at runtime. While making e.g. debugging easier by not having to do a separate build, this feature can also help maintainers of bindings for libgit2 by tying the memory allocations into the other language's memory system. In order to do so, though, we first need to make our two different pre-existing allocators "stdalloc" and "crtdbg" have the same function signatures, as the "crtdbg" allocators all have an additional file and line argument. This is required to build correct stack traces for debugging memory allocations. As that feature may also be interesting to authors of other applications for debugging libgit2, we now simply add these arguments to our standard allocators. Obviously, this may come with a performance penalty. During some simple benchmarks no real impact could be measured though in contrast to a simple pluggable allocator. The following table summarizes the benchmarks. There were three different builds with our current standard allocator ("standard"), with pluggable authenticators accessed via function pointers ("pluggable") and for pluggable authenticators with file and line being added ("fileline"). Furthermore, there were three scenarios for 100.000.000 allocations of 100B ("small alloc"), 100.000.000 allocations of 100KB ("medium alloc"), and 1.000.000 allocations of 100MB. All results are best of 10 runs. |------------|-------------------|-------------------|-------------------| | build/test | small alloc | medium alloc | big alloc | |------------|-------------------|-------------------|-------------------| | standard | 4539779566, +0.0% | 5912927186, +0.0% | 5166935308, +0.0% | |------------|-------------------|-------------------|-------------------| | pluggable | 4611074505, +1.5% | 5979185308, +1.1% | 5388776352, +4.2% | |------------|-------------------|-------------------|-------------------| | fileline | 4588338192, +1.1% | 6004951910, +1.5% | 4942528135, -4.4% | |------------|-------------------|-------------------|-------------------| As can be seen, there is a performance overhead for pluggable allocators. Furthermore, it can also be seen that there is some big variance between runs, especially in the "big alloc" scenario. This is probably being caused by nondeterministic behaviour in the kernel for dynamic allocations. Still, it can be observed that there should be no real difference between the "pluggable" and "fileline" allocators.
Patrick Steinhardt d2e996fa 2018-03-14T10:36:14 util: extract allocators into its own "alloc.h" header Our "util.h" header is a grabbag of various different functions, where many don't have a clear group they belong to. Our set of allocator functions though can be clearly singled out as a single group of functions that always belongs together. Furthermore, we will need to implement additional functions relating to our allocators subsystem when moving to pluggable allocators. Thus, we should just move these functions into their own "alloc" module.
Patrick Steinhardt c47f7155 2018-03-14T10:34:59 util: extract `stdalloc` allocator into its own module Right now, the standard allocator is being declared as part of the "util.h" header as a set of inline functions. As with the crtdbg allocator functions, these inline functions make it hard to convert to function pointers for our allocators. Create a new "stdalloc" module containing our standard allocations functions to split these out. Convert the existing allocators to macros which make use of the stdalloc functions.
Patrick Steinhardt 496b0df2 2018-03-14T10:28:50 win32: crtdbg: provide independent `free` function Currently, the `git__free` function is being defined in a single place, only, disregarding whether we use our standard allocators or the crtdbg allocators. This makes it a bit harder to convert our code base to use pluggable allocators, and furthermore makes the border between our two allocators a bit more blurry. Implement a separate `git__crtdbg__free` function for the crtdbg allocator in order to completely separate both allocator implementations.
Patrick Steinhardt aab8f87b 2018-03-14T10:27:13 win32: crtdbg: internalize implementation of allocators The crtdbg allocators are currently being implemented as inline functions as part of the "w32_crtdbg_stacktrace.h" header. As we are moving towards pluggable allocators with the help of function pointers, though, we cannot make use of inlining anymore. Instead, we can only have a single implementation of these allocating functions. Move all implementations of the crtdbg allocators into "w32_crtdbg_stacktrace.c".
Patrick Steinhardt 422cd59b 2018-06-07T12:49:55 Merge pull request #4655 from glaubitz/alignment index: Fix alignment issues in write_disk_entry()
David Turner 5a7d454b 2018-06-04T12:56:08 Fix stash save bug with fast path index check If the index contains stat data for a modified file, and the file is not racily dirty, and there exists an untracked working tree directory alphabetically after that file, and there are no other changes to the repo, then git_stash_save would fail. It would confuse the untracked working tree directory for the modified file, because they have the same sha: zero. The wt directory has a sha of zero because it's a directory, and the file would have a zero sha because we wouldn't read the file -- we would just know that it doesn't match the index. To fix this confusion, we simply check mode as well as SHA.
Patrick Steinhardt 20306d36 2018-06-06T14:31:28 Merge pull request #4665 from neithernut/fix-refdb-glob refdb_fs: fix regression: failure when globbing for non-existant references
Patrick Steinhardt 54990d75 2018-06-06T08:36:43 Merge pull request #4641 from pks-t/pks/submodule-names-memleak Detect duplicated submodules for the same path
Patrick Steinhardt d22fd81c 2018-06-05T16:46:07 ignore: remove now-useless check for LEADINGDIR When checking whether a rule negates another rule, we were checking whether a rule had the `GIT_ATTR_FNMATCH_LEADINGDIR` flag set and, if so, added a "/*" to its end before passing it to `fnmatch`. Our code now sets `GIT_ATTR_FNMATCH_NOLEADINGDIR`, thus the `LEADINGDIR` flag shall never be set. Furthermore, due to the `NOLEADINGDIR` flag, trailing globs do not get consumed by our ignore parser anymore. Clean up code by just dropping this now useless logic.
Patrick Steinhardt 20b4c175 2018-06-05T16:12:58 ignore: fix negative leading directory rules unignoring subdirectory files When computing whether a file is ignored, we simply search for the first matching rule and return whether it is a positive ignore rule (the file is really ignored) or whether it is a negative ignore rule (the file is being unignored). Each rule has a set of flags which are being passed to `fnmatch`, depending on what kind of rule it is. E.g. in case it is a negative ignore we add a flag `GIT_ATTR_FNMATCH_NEGATIVE`, in case it contains a glob we set the `GIT_ATTR_FNMATCH_HASGLOB` flag. One of these flags is the `GIT_ATTR_FNMATCH_LEADINGDIR` flag, which is always set in case the pattern has a trailing "/*" or in case the pattern is negative. The flag causes the `fnmatch` function to return a match in case a string is a leading directory of another, e.g. "dir/" matches "dir/foo/bar.c". In case of negative patterns, this is wrong in certain cases. Take the following simple example of a gitignore: dir/ !dir/ The `LEADINGDIR` flag causes "!dir/" to match "dir/foo/bar.c", and we correctly unignore the directory. But take this example: *.test !dir/* We expect everything in "dir/" to be unignored, but e.g. a file in a subdirectory of dir should be ignored, as the "*" does not cross directory hierarchies. With `LEADINGDIR`, though, we would just see that "dir/" matches and return that the file is unignored, even if it is contained in a subdirectory. Instead, we want to ignore leading directories here and check "*.test". Afterwards, we have to iterate up to the parent directory and do the same checks. To fix the issue, disallow matching against leading directories in gitignore files. This can be trivially done by just adding the `GIT_ATTR_FNMATCH_NOLEADINGDIR` to the spec passed to `git_attr_fnmatch__parse`. Due to a bug in that function, though, this flag is being ignored for negative patterns, which is fixed in this commit, as well. As a last fix, we need to ignore rules that are supposed to match a directory when our path itself is a file. All together, these changes fix the described error case.
Julian Ganz 05e891f1 2018-06-01T08:44:30 refdb_fs: test whether the base directory exists when globbing This commit fixes a regression introduced by 20a2b02d9a1bcb4825ec49605146223c565dcacf The commit introduced an optimization for finding references using a glob: rather than iterating over all references and matching each one against the glob, we would iterate only over references within the directory common to all possible references which may match against the glob. However, contrary to the `ref/` directory, which was the previous entry point for the iteration, this directory may not exist. In this case, the optimization causes an error (`ENOENT`) rather than the iterator simply yielding no references. This patch fixes the regression by checkign for this specific case.
John Paul Adrian Glaubitz 93271f59 2018-05-25T01:41:33 index: Fix alignment issues in write_disk_entry() In order to avoid alignment issues on certain target architectures, it is necessary to use memcpy() when modifying elements of a struct inside a buffer returned by git_filebuf_reserve().
Patrick Steinhardt 92159bd4 2018-05-30T12:18:04 path: unify `git_path_is_*` APIs Right now, there's quite a lot of different function calls to determine whether a path component matches a specific name after normalization from the filesystem. We have a function for each of {gitattributes, gitmodules, gitignore} multiplicated with {generic, NTFS, HFS} checks. In the long time, this is unmaintainable in case there are e.g. new filesystems with specific semantics, blowing up the number of functions we need to implement. Replace all functions with a simple `git_path_is_gitfile` function, which accepts an enum pointing out the filename that is to be checked against as well as the filesystem normalizations to check for. This greatly simplifies implementation at the expense of the caller having to invoke a somewhat longer function call.
Patrick Steinhardt 8a14846b 2018-05-30T10:51:10 Merge pull request #4661 from laomaiweng/patch-1 streams: openssl: add missing check on OPENSSL_LEGACY_API
Patrick Steinhardt 9c698a25 2018-05-30T10:34:58 submodule: remove useless mask computations Previous to dfda2f68e (submodule: remove the per-repo cache, 2015-04-27), we tried to cache our submodules per repository to avoid having to reload it too frequently. As it created some headaches with regards to multithreading, we removed that cache. Previous to that removal, we had to compute what submodule status to refresh. The mask computation was not removed, though, resulting in confusing and actually dead code. While it seems like the mask is currently in use in a conditional, it is not, as we unconditionally assign to the mask previous to that condition. Remove all mask computations to clean up stale code.
Patrick Steinhardt cf5030a3 2018-05-30T08:38:28 submodule: refactor loading submodule names The function `load_submodule_names` was always being called with a newly allocated string map, which was then getting filled by the function. Move the string map allocation into `load_submodule_names`, instead, and pass the whole map back to the caller in case no error occurs. This change helps to avoid misuse by handing in pre-populated maps.
Patrick Steinhardt b2a389c8 2018-05-30T08:35:06 submodule: detect duplicated submodule paths When loading submodule names, we build a map of submodule paths and their respective names. While looping over the configuration keys, we do not check though whether a submodule path was seen already. This leads to a memory leak in case we have multiple submodules with the same path, as we just overwrite the old value in the map in that case. Fix the error by verifying that the path to be added is not yet part of the string map. Git does not allow to have multiple submodules for a path anyway, so we now do the same and detect this duplication, reporting it to the user.
Patrick Steinhardt 36ae5c93 2018-05-30T08:25:19 Merge pull request #4656 from tiennou/fix/mbedtls-no-pkgconfig mbedtls: don't require mbedtls from our pkgconfig file
Quentin Minster b1cab70b 2018-05-30T02:15:09 streams: openssl: add missing check on OPENSSL_LEGACY_API The `CRYPTO_THREADID` type is no longer available in OpenSSL ≥ 1.1.0 with deprecated features disabled, and causes build failures. Since the `threadid_cb()` function is only ever called by `git_openssl_set_locking()` when `defined(OPENSSL_LEGACY_API)`, only define it then.