Commit Graph

93 Commits

Author SHA1 Message Date
Timo Röhling
ad5611d85b New upstream version 1.5.0+ds 2022-08-28 14:13:25 +02:00
Mohammed Bilal
e579e0f707 New upstream version 1.4.3+dfsg.1 2022-05-05 10:45:21 +00:00
Pirate Praveen
c25aa7cd82 New upstream version 1.3.0+dfsg.1 2021-12-10 16:42:08 +05:30
Utkarsh Gupta
22a2d3d5ef New upstream version 1.1.0+dfsg.1 2020-12-07 04:06:37 +05:30
Jongmin Kim
ac3d33df5d New upstream version 0.28.1+dfsg.1 2019-05-12 00:29:21 +09:00
Patrick Steinhardt
6c23704df5 settings: rename GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION
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.
2017-06-08 21:40:18 +02:00
Patrick Steinhardt
35079f507b odb: add option to turn off hash verification
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.
2017-04-28 14:05:45 +02:00
Sven Strickroth
d5e6ca1e4a Allow to configure default file share mode for opening files
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>
2017-04-03 23:13:00 +01:00
Edward Thomson
2a5ad7d0f2 fsync: call it "synchronous" object writing
Rename `GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION` ->
`GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`.
2017-02-28 13:29:01 +00:00
Edward Thomson
6d3ad7e09e Add ENABLE_SYNCHRONIZED_OBJECT_CREATION option
Allow users to enable `SYNCHRONIZED_OBJECT_CREATION` with a setting.
2017-02-28 13:27:49 +00:00
Gaurav Saral
61acc9fade Changes to provide option to turn off/on ofs_delta
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
2017-02-10 15:22:00 +05:30
Edward Thomson
8d3b39a6ad Merge branch 'pr/3912' 2017-01-21 23:50:38 +00:00
Edward Thomson
28d0ba0ba5 symbolic ref target validation: fixups
Fixups requested in #3912.
2017-01-21 23:45:23 +00:00
Carlos Martín Nieto
77e4623257 settings: clarify what each value means
Most importantly, clarify what it means for HTTPS and SSH to be supported.
2016-12-17 14:31:36 +00:00
Edward Thomson
93392cdd91 docs: GIT_OPT_ENABLE_STRICT_OBJECT_CREATION is enabled
We changed the defaults on strict object creation - it is enabled by
default.  Update the documentation to reflect that.
2016-10-09 11:27:56 +01:00
Richard Ipsum
452bf57cbe Make symbolic ref target validation optional
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.
2016-08-27 18:25:02 +01:00
Andrius Bentkus
f1dba14481 Add get user agent functionality. 2016-07-05 18:10:24 +03:00
Carlos Martín Nieto
9844453611 Add a no-op size_t typedef for the doc parser
Clang's documentation parser, which we use in our documentation system
does not report any comments for functions which use size_t as a type.

The root cause is buried somewhere in libclang but we can work around it
by defining the type ourselves. This typedef makes sure that libclang
sees it and that we do not change its size.
2016-03-31 11:55:47 +02:00
Dirkjan Bussink
fa72d6daf8 Setup better defaults for OpenSSL ciphers
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
2016-03-14 12:07:13 +00:00
Carlos Martín Nieto
1ddada422c Merge pull request #3636 from nerdishbynature/fix-non-modular-header-in-module
Don't include inttypes if compiling for Mac/iOS
2016-03-11 16:31:32 +01:00
Piet Brauer
0ac4a5ded4 Check for __CLANG_INTTYPES_H
This fixes an issue in Xcode 7.3 in objective-git where we get the error
"Include of non-modular header file in module". Not importing this
header again fixes the issue.
2016-03-11 10:33:37 +08:00
Edward Thomson
22a19f5b57 git_libgit2_opts: introduce GIT_OPT_ENABLE_STRICT_OBJECT_CREATION 2016-02-28 12:38:39 -05:00
Edward Thomson
5bc93eaea0 git_libgit2_opts: document GIT_OPT_SET_USER_AGENT 2016-02-22 22:26:01 -05:00
Edward Thomson
3eac1037d6 settings: allow users to set PROGRAMDATA
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.
2015-11-16 23:31:19 -05:00
Carlos Martín Nieto
75a0ccf52f Merge pull request #3170 from CmdrMoozy/nsec_fix
git_index_entry__init_from_stat: set nsec fields in entry stats
2015-11-12 19:53:09 +01:00
Carlos Martín Nieto
de870533e0 settings: add a setter for a custom user-agent 2015-11-12 17:18:42 +01:00
Linquize
240a85cf10 inttypes.h is built-in header file since MSVC 2013
The reason is that the types defined in libgit2's inttypes.h collide with system inttypes.h
3rd party library header files may directly reference MSVC's built-in inttypes.h

Fixes #3476
2015-10-22 07:56:34 +08:00
Edward Thomson
0f9b6742ad win32: add c linkage guard around inttypes.h inclusion 2015-10-21 09:24:10 -04:00
Axel Rasmussen
0269833f92 settings: expose GIT_USE_NSEC flag in git_libgit2_features 2015-09-18 23:33:56 -07:00
Carlos Martín Nieto
a295bd2dc4 doc: add documentation to all the public structs and enums
This makes them show up in the reference, even if the text itself isn't
the most descriptive.

These have been found with

    grep -Przon '\n\ntypedef struct.*?\{' -- include
    grep -Przon '\n\ntypedef enum.*?\{' -- include
2014-12-06 03:44:40 +01:00
Russell Belfer
babbff347c Move un-namespaced constant to internal header
FLAG_BITS only seems to be used internally
2014-10-10 15:17:05 -07:00
Carlos Martín Nieto
9b36537de4 Merge pull request #2588 from swansontec/ssl-cert-path2
Add support for setting the SSL CA location
2014-10-10 17:42:52 +02:00
William Swanson
737b445a18 Add support for setting the SSL CA location
This allows users to specify self-signed certificates, or to provide their
own certificate stores on limited platforms such as mobile phones.
2014-09-30 17:26:39 -07:00
nulltoken
3a728fb508 object: introduce git_describe_object() 2014-04-30 09:46:25 +02:00
Carlos Martín Nieto
6057c4a038 opts: bits are not bytes
The default cache size is 256 megabytes, not megabits as claimed in the
docs.
2014-03-24 13:21:51 +01:00
Carlos Martín Nieto
42dee8ecd7 settings: use git_buf for returning strings
This survived the last round of culling, as the signature is only in the
comments.
2014-03-24 13:21:51 +01:00
Arthur Schreiber
96484ecd9e Fix the description for GIT_FEATURE_SSH. 2014-03-03 12:59:35 +01:00
Vicent Marti
ebb3c506fd features: Rename _HAS_ to _FEATURE_ 2014-03-03 12:40:25 +01:00
Vicent Marti
2491c416ed caps: Rename the enum name too! 2014-03-03 12:13:17 +01:00
Vicent Marti
c9f5298b0e caps: Rename to features to avoid confusion 2014-03-03 12:10:36 +01:00
Russell Belfer
72556cc63b Address PR comments
* Make GIT_INLINE an internal definition so it cannot be used in
  public headers
* Fix language in CONTRIBUTING
* Make index caps API use signed instead of unsigned values
2014-02-20 14:27:10 -08:00
Linquize
1b57699a3a Fix typo in documentation 2013-09-22 09:38:51 +08:00
Linquize
b99b10f285 Can git_libgit2_opts() with GIT_OPT_GET_TEMPLATE_PATH and GIT_OPT_SET_TEMPLATE_PATH 2013-09-18 00:00:41 +08:00
Russell Belfer
290e147985 Add GIT_CAP_SSH if library was built with SSH
This also adds a test that actually calls git_libgit2_capabilities
and git_libgit2_version.
2013-07-09 16:17:41 -07:00
Russell Belfer
2e62e7c23c Docs for git_libgit2_opts and cache disable tweak
This adds docs for the cache control options to git_libgit2_opts
and also tweaks the cache code so that if the cache is disabled,
then the next time we attempt to insert something into the cache
in question, we will actually clear any old cached objects.
2013-05-24 10:33:41 -07:00
Russell Belfer
0f1f9833cf Add typedefs on some public enums
Apparently this makes things easier to bind in some languages.
2013-05-24 10:32:07 -07:00
Carlos Martín Nieto
b4117e19b7 docs: formatting fixes 2013-04-24 20:25:57 +02:00
Vicent Marti
a2378ae4fe opts: Add getter for cached memory 2013-04-23 20:42:29 +02:00
Vicent Marti
d877159260 cache: Max cache size, and evict when the cache fills up 2013-04-22 17:04:52 +02:00
Vicent Marti
ee12272d17 Global option setters 2013-04-22 16:50:51 +02:00