- 27 Nov, 2020 1 commit
-
-
Edward Thomson committed
-
- 11 Oct, 2020 1 commit
-
-
Our "global initialization" has accumulated some debris over the years. It was previously responsible for both running the various global initializers (that set up various subsystems) _and_ setting up the "global state", which is actually the thread-local state for things like error reporting. Separate the thread local state out into "threadstate". Use the normal subsystem initialization functions that we already have to set it up. This makes both the global initialization system and the threadstate system simpler to reason about.
Edward Thomson committed
-
- 09 Jun, 2020 1 commit
-
-
When compiling libgit2 with -DDEPRECATE_HARD, we add a preprocessor definition `GIT_DEPRECATE_HARD` which causes the "git2/deprecated.h" header to be empty. As a result, no function declarations are made available to callers, but the implementations are still available to link against. This has the problem that function declarations also aren't visible to the implementations, meaning that the symbol's visibility will not be set up correctly. As a result, the resulting library may not expose those deprecated symbols at all on some platforms and thus cause linking errors. Fix the issue by conditionally compiling deprecated functions, only. While it becomes impossible to link against such a library in case one uses deprecated functions, distributors of libgit2 aren't expected to pass -DDEPRECATE_HARD anyway. Instead, users of libgit2 should manually define GIT_DEPRECATE_HARD to hide deprecated functions. Using "real" hard deprecation still makes sense in the context of CI to test we don't use deprecated symbols ourselves and in case a dependant uses libgit2 in a vendored way and knows it won't ever use any of the deprecated symbols anyway.
Patrick Steinhardt committed
-
- 24 Jan, 2020 1 commit
-
-
Stop returning a void for functions, future-proofing them to allow them to fail.
Edward Thomson committed
-
- 15 Jun, 2019 1 commit
-
-
The only function that is named `issomething` (without underscore) was `git_oid_iszero`. Rename it to `git_oid_is_zero` for consistency with the rest of the library.
Edward Thomson committed
-
- 22 Jan, 2019 1 commit
-
-
Move to the `git_error` name in the internal API for error-related functions.
Edward Thomson committed
-
- 03 Jul, 2017 1 commit
-
-
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.
Patrick Steinhardt committed
-
- 29 Dec, 2016 1 commit
-
-
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
Edward Thomson committed
-
- 13 Feb, 2015 2 commits
-
-
Introduce git__reallocarray that checks the product of the number of elements and element size for overflow before allocation. Also introduce git__mallocarray that behaves like calloc, but without the `c`. (It does not zero memory, for those truly worried about every cycle.)
Edward Thomson committed -
Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
Edward Thomson committed
-
- 27 Oct, 2014 1 commit
-
-
Pierre-Olivier Latour committed
-
- 18 Aug, 2014 1 commit
-
-
The old `allocfmt` is of no use to callers, as they are not able to free the returned buffer. Export a new API that returns a static string that doesn't need to be freed.
Vicent Marti committed
-
- 07 Mar, 2014 1 commit
-
-
Jiri Pospisil committed
-
- 20 Feb, 2014 1 commit
-
-
Russell Belfer committed
-
- 13 Jan, 2014 1 commit
-
-
Signed-off-by: Brodie Rao <brodie@sf.io>
Brodie Rao committed
-
- 19 Sep, 2013 1 commit
-
-
Linquize committed
-
- 31 Aug, 2013 1 commit
-
-
Linquize committed
-
- 22 May, 2013 1 commit
-
-
os->full was set 1, but the overflowed idx_leaf was still used to index into os->nodes a little later. Returning NULL fixes that.
Axel Wagner committed
-
- 17 May, 2013 1 commit
-
-
I frequently want to the the first N digits of an OID formatted as a string and I'd like it to be efficient. This function makes that easy and I could rewrite the OID formatters in terms of it.
Russell Belfer committed
-
- 29 Apr, 2013 4 commits
-
-
Russell Belfer committed
-
Add a new git_oid_strcmp that compares a string OID with a hex oid for sort order, and then reimplement git_oid_streq using it. This actually should speed up git_oid_streq because it only reads as far into the string as it needs to, whereas previously it would convert the whole string into an OID and then use git_oid_cmp.
Russell Belfer committed -
git_oid_ncmp was making some assumptions about the length of the data - this shifts the check to the top of the loop so it will work more robustly, limits the max, and adds some tests to verify the functionality.
Russell Belfer committed -
Russell Belfer committed
-
- 25 Mar, 2013 1 commit
-
-
Vicent Marti committed
-
- 21 Mar, 2013 2 commits
- 08 Jan, 2013 1 commit
-
-
Edward Thomson committed
-
- 04 Jan, 2013 2 commits
-
-
I made a small change to the behavior of this code and apparently got it wrong. Sigh.
Russell Belfer committed -
Previously a NULL oid was handled like an empty buffer and returned a status empty string. This makes git_oid_tostr() set the output buffer to the empty string instead.
Russell Belfer committed
-
- 23 Nov, 2012 1 commit
-
-
Remove words such as fuck, crap, shit etc. Remove other potentially offensive words from comments. Tidy up other geopolicital terms in comments.
Martin Woodward committed
-
- 25 Aug, 2012 1 commit
-
-
Revparse now returns EAMBIGUOUS if the the spec doesn't match any refs/tags, and is <4 characters.
Ben Straub committed
-
- 29 Jul, 2012 1 commit
-
-
git.git uses an inlined hashcmp function instead of memcmp, since it performes much better when comparing hashes (most hashes compared diverge within the first byte). Measurements and rationale for the curious reader: http://thread.gmane.org/gmane.comp.version-control.git/172286
Michael Schubert committed
-
- 24 Jul, 2012 1 commit
-
-
nulltoken committed
-
- 17 Apr, 2012 1 commit
-
-
This fixes all the warnings on win64 except those in deps, which come from the regex code.
Russell Belfer committed
-
- 02 Apr, 2012 1 commit
-
-
Vicent Martí committed
-
- 19 Mar, 2012 1 commit
-
-
This includes a few cleanups that came up while converting these files. This commit introduces a could new git error classes, including the catchall class: GITERR_INVALID which I'm using as the class for invalid and out of range values which are detected at too low a level of library to use a higher level classification. For example, an overflow error in parsing an integer or a bad letter in parsing an OID string would generate an error in this class.
Russell Belfer committed
-
- 06 Mar, 2012 1 commit
-
-
To conform the naming scheme of git_oid_fromstr we should change the name of git_oid_to_string to git_oid_tostr.
Authmillenon committed
-
- 02 Mar, 2012 1 commit
-
-
This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
Russell Belfer committed
-
- 13 Feb, 2012 1 commit
-
-
Signed-off-by: schu <schu-github@schulog.org>
schu committed
-
- 28 Dec, 2011 1 commit
-
-
nulltoken committed
-