summaryrefslogtreecommitdiff
path: root/src/settings.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow bypassing check '.keep' files using libgit2 option ↵Dhruva Krishnamurthy2019-02-021-0/+5
| | | | 'GIT_OPT_IGNORE_PACK_KEEP_FILE_CHECK'
* git_error: use new names in internal APIs and usageEdward Thomson2019-01-221-7/+7
| | | | | Move to the `git_error` name in the internal API for error-related functions.
* object_type: use new enumeration namesethomson/index_fixesEdward Thomson2018-12-011-1/+1
| | | | Use the new object_type enumeration names within the codebase.
* INDEXER_MAX_OBJECTS -> PACK_MAX_OBJECTSNelson Elhage2018-07-161-2/+2
|
* Add a git_libgit2_opts option to set the max indexer object countNelson Elhage2018-07-121-1/+9
|
* settings: optional unsaved index safetyEdward Thomson2018-06-291-0/+5
| | | | | | | | | | | | | | 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.
* settings: allow swapping out memory allocatorPatrick Steinhardt2018-06-071-0/+5
| | | | | | | 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.
* mbedtls: load default CA certificatesEtienne Samson2018-04-111-1/+4
|
* mbedtls: default cipher list supportEtienne Samson2018-04-111-1/+1
|
* mbedtls: initial supportEtienne Samson2018-04-111-0/+11
|
* https: correct some error messagesEtienne Samson2017-10-231-2/+2
|
* https: Prevent OpenSSL from namespace-leakingEtienne Samson2017-10-231-5/+2
|
* Make sure to always include "common.h" firstPatrick Steinhardt2017-07-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
* settings: rename `GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`Patrick Steinhardt2017-06-081-2/+2
| | | | | | | | | | | Initially, the setting has been solely used to enable the use of `fsync()` when creating objects. Since then, the use has been extended to also cover references and index files. As the option is not yet part of any release, we can still correct this by renaming the option to something more sensible, indicating not only correlation to objects. This commit renames the option to `GIT_OPT_ENABLE_FSYNC_GITDIR`. We also move the variable from the object to repository source code.
* Merge pull request #4197 from pks-t/pks/verify-object-hashesEdward Thomson2017-05-011-0/+5
|\ | | | | Verify object hashes
| * odb: add option to turn off hash verificationPatrick Steinhardt2017-04-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | Verifying hashsums of objects we are reading from the ODB may be costly as we have to perform an additional hashsum calculation on the object. Especially when reading large objects, the penalty can be as high as 35%, as can be seen when executing the equivalent of `git cat-file` with and without verification enabled. To mitigate for this, we add a global option for libgit2 which enables the developer to turn off the verification, e.g. when he can be reasonably sure that the objects on disk won't be corrupted.
* | cmake: define GIT_HTTPS when HTTPS is supportedPatrick Steinhardt2017-04-251-1/+1
|/
* Allow to configure default file share mode for opening filesSven Strickroth2017-04-031-0/+12
| | | | | | This can prevent FILE_SHARED_VIOLATIONS when used in tools such as TortoiseGit TGitCache and FILE_SHARE_DELETE, because files can be opened w/o being locked any more. Signed-off-by: Sven Strickroth <email@cs-ware.de>
* fsync: call it "synchronous" object writingEdward Thomson2017-02-281-2/+2
| | | | | Rename `GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION` -> `GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`.
* Add `ENABLE_SYNCHRONIZED_OBJECT_CREATION` optionEdward Thomson2017-02-281-0/+4
| | | | Allow users to enable `SYNCHRONIZED_OBJECT_CREATION` with a setting.
* Changes to provide option to turn off/on ofs_deltaGaurav Saral2017-02-101-0/+5
| | | | This change provides an option in git_libgit2_opt_t which can be used in git_libgit2_opts to turn off/on ofs_delta capability in libGit2
* Merge branch 'pr/3912'Edward Thomson2017-01-211-0/+5
|\
| * symbolic ref target validation: fixupsEdward Thomson2017-01-211-1/+1
| | | | | | | | Fixups requested in #3912.
| * Make symbolic ref target validation optionalRichard Ipsum2016-08-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce GIT_OPT_ENABLE_SYMBOLIC_REF_TARGET_VALIDATION option. Setting this option to 0 allows validation of a symbolic ref's target to be bypassed. This option is enabled by default. This mechanism is added primarily to address a discrepancy between git behaviour and libgit2 behaviour, whereby the former allows the symbolic ref target to carry an arbitrary string and the latter does not, so: $ git symbolic-ref refs/heads/foo bar $ cat .git/refs/heads/foo ref: bar where as attempting the same via libgit2 raises an error: The given reference name 'bar' is not valid this mechanism also allows those that might want to make use of git's more lenient treatment of symbolic ref targets to do so.
* | giterr_set: consistent error messagesEdward Thomson2016-12-291-1/+1
| | | | | | | | | | | | | | | | Error messages should be sentence fragments, and therefore: 1. Should not begin with a capital letter, 2. Should not conclude with punctuation, and 3. Should not end a sentence and begin a new one
* | settings: don't hard-code HTTPS capabilityCarlos Martín Nieto2016-12-171-0/+2
|/ | | | | | | | | | This partially reverts bdec62dce1c17465b7330100ea2f71e63fc411dd which activates the transport code-paths which allow you to use a custom TLS implementation without having to have one at build-time. However the capabilities describe how libgit2 was built, not what it could potentially support, bring back the ifdefs so we only say we support HTTPS if libgit2 was itself built with a TLS implementation.
* Merge pull request #3850 from wildart/custom-tlsEdward Thomson2016-08-041-2/+0
|\ | | | | Enable https transport for custom TLS streams
| * remove conditions that prevent use of custom TLS streamwildart2016-07-061-2/+0
| |
* | Add get user agent functionality.Andrius Bentkus2016-07-051-0/+8
|/
* Avoid old-style function definitionsPatrick Steinhardt2016-06-211-3/+3
| | | | | | Avoid declaring old-style functions without any parameters. Functions not accepting any parameters should be declared with `void fn(void)`. See ISO C89 $3.5.4.3.
* Start error string with lower case characterDirkjan Bussink2016-03-141-2/+2
|
* Setup better defaults for OpenSSL ciphersDirkjan Bussink2016-03-141-0/+22
| | | | | | | | | This ensures that when using OpenSSL a safe default set of ciphers is selected. This is done so that the client communicates securely and we don't accidentally enable unsafe ciphers like RC4, or even worse some old export ciphers. Implements the first part of https://github.com/libgit2/libgit2/issues/3682
* git_libgit2_opts: introduce `GIT_OPT_ENABLE_STRICT_OBJECT_CREATION`Edward Thomson2016-02-281-0/+6
|
* git_libgit2_opts: validate keyEdward Thomson2016-02-221-0/+3
|
* settings: allow users to set PROGRAMDATAEdward Thomson2015-11-161-3/+12
| | | | | | Allow users to set the `git_libgit2_opts` search path for the `GIT_CONFIG_LEVEL_PROGRAMDATA`. Convert `GIT_CONFIG_LEVEL_PROGRAMDATA` to `GIT_SYSDIR_PROGRAMDATA` for setting the configuration.
* Merge pull request #3170 from CmdrMoozy/nsec_fixCarlos Martín Nieto2015-11-121-0/+3
|\ | | | | git_index_entry__init_from_stat: set nsec fields in entry stats
| * settings: expose GIT_USE_NSEC flag in git_libgit2_featuresAxel Rasmussen2015-09-181-0/+3
| |
* | settings: add a setter for a custom user-agentCarlos Martín Nieto2015-11-121-0/+16
|/
* Rename GIT_SSL to GIT_OPENSSLCarlos Martín Nieto2015-04-231-3/+3
| | | | | This is what it's meant all along, but now we actually have multiple implementations, it's clearer to use the name of the library.
* Add a SecureTransport TLS channelCarlos Martín Nieto2015-04-231-1/+1
| | | | | As an alternative to OpenSSL when we're on OS X. This one can actually take advantage of stacking the streams.
* Add support for setting the SSL CA locationWilliam Swanson2014-09-301-0/+22
| | | | | This allows users to specify self-signed certificates, or to provide their own certificate stores on limited platforms such as mobile phones.
* settings: use git_buf for returning stringsCarlos Martín Nieto2014-03-241-6/+14
| | | | | This survived the last round of culling, as the signature is only in the comments.
* features: Rename `_HAS_` to `_FEATURE_`vmg/featuresVicent Marti2014-03-031-3/+3
|
* caps: Rename to features to avoid confusionVicent Marti2014-03-031-4/+4
|
* Merge pull request #2138 from ethomson/sysdirVicent Marti2014-02-251-11/+11
|\ | | | | Move system directory cache out of utils
| * Move system directory cache out of utilsEdward Thomson2014-02-241-11/+11
| |
* | Remove now-duplicated stdarg.h includeEdward Thomson2014-02-241-2/+0
|/
* Move libgit2 settings out of utilEdward Thomson2014-01-141-0/+134