- 28 Sep, 2018 3 commits
-
-
The header "config_file.h" has a list of inline-functions to access the contents of a config backend without directly messing with the struct's function pointers. While all these functions are called "git_config_file_*", they are in fact completely backend-agnostic and don't care whether it is a file or not. Rename all the function to instead be backend-agnostic versions called "git_config_backend_*" and rename the header to match.
Patrick Steinhardt committed -
The function `git_config_file_normalize_section` is never being used in any file different than "config.c", but it is implemented in "config_file.c". Move it over and make the symbol static.
Patrick Steinhardt committed -
As a last step to make variables and structures more backend agnostic for our `git_config` structure, rename local variables to not be called `file` anymore.
Patrick Steinhardt committed
-
- 21 Sep, 2018 4 commits
-
-
Same as with the previous commit, the `file_internal` struct is used to keep track of all the backends that are added to a `git_config` struct. Rename it to `backend_internal` and rename its `file` member to `backend` to make the implementation more backend-agnostic.
Patrick Steinhardt committed -
Originally, the `git_config` struct is a collection of all the parsed configuration files from different scopes (system-wide config, user-specific config as well as the repo-specific config files). Historically, we didn't and don't yet have any other configuration backends than the one for files, which is why the field holding the config backends is called `files`. But in fact, nothing dictates that the vector of backends actually holds file backends only, as they are generic and custom backends can be implemented by users. Rename the member to be called `backends` to clarify that there is nothing specific to files here.
Patrick Steinhardt committed -
The variables `git_config_escaped` and `git_config_escapes` are both defined as static const character pointers in "config_parse.h". In case where "config_parse.h" is included but those two variables are not being used, the compiler will thus complain about defined but unused variables. Fix this by declaring them as external and moving the actual initialization to the C file. Note that it is not possible to simply make this a #define, as we are indexing into those arrays.
Patrick Steinhardt committed -
When populating the list of submodule names, we use the submodule configuration entry's name as the key in the map of submodule names. This creates a hidden dependency on the liveliness of the configuration that was used to parse the submodule, which is fragile and unexpected. Fix the issue by duplicating the string before writing it into the submodule name map.
Patrick Steinhardt committed
-
- 19 Sep, 2018 2 commits
-
-
Rename "VSTS" to "Azure DevOps" and "Azure Pipelines"
Edward Thomson committed -
cmake: enable -Wformat and -Wformat-security
Edward Thomson committed
-
- 18 Sep, 2018 6 commits
-
-
Visual Studio Team Services is now a family of applications named "Azure DevOps". Update the README to refer to it thusly.
Edward Thomson committed -
VSTS is now a family of components; "Azure Pipelines" is the build and release pipeline application.
Edward Thomson committed -
Edward Thomson committed
-
Fix revwalk limiting regression
Edward Thomson committed -
path validation: `char` is not signed by default.
Edward Thomson committed -
revwalk: refer the sorting modes more to git's options
Edward Thomson committed
-
- 17 Sep, 2018 4 commits
-
-
Show more directly what the sorting modes correspond to in git's `rev-list` as that's the reference implementation for what the possible sorting orders are.
Carlos Martín Nieto committed -
We do not currently have any warnings in this regard, but it's good practice to have them on in case we introduce something.
Carlos Martín Nieto committed -
This is not a big deal, but it does make us match git more closely by checking only the first. The lists are sorted already, so there should be no functional difference other than removing a possible check from every iteration in the loop.
Carlos Martín Nieto committed -
When porting, we overlooked that the difference between git's and our's time representation and copied their way of getting the max value. Unfortunately git was using unsigned integers, so `~0ll` does correspond to their max value, whereas for us it corresponds to `-1`. This means that we always consider the last date to be smaller than the current commit's and always think commits are interesting. Change the initial value to the macro that gives us the maximum value on each platform so we can accurately consider commits interesting or not.
Carlos Martín Nieto committed
-
- 12 Sep, 2018 1 commit
-
-
ARM treats its `char` type as `unsigned type` by default; as a result, testing a `char` value as being `< 0` is always false. This is a warning on ARM, which is promoted to an error given our use of `-Werror`. Per ISO 9899:199, section "6.2.5 Types": > The three types char, signed char, and unsigned char are collectively > called the character types. The implementation shall define char to > have the same range, representation, and behavior as either signed > char or unsigned char. > ... > Irrespective of the choice made, char is a separate type from the other > two and is not compatible with either.
Edward Thomson committed
-
- 09 Sep, 2018 1 commit
-
-
Clar XML output redux
Edward Thomson committed
-
- 08 Sep, 2018 1 commit
-
-
Instead of trying to have a clever iterator pattern that increments the error number, just iterate over errors in the report errors or report all functions as it's easier to reason about in this fashion.
Edward Thomson committed
-
- 07 Sep, 2018 2 commits
-
-
remote: store the connection data in a private struct
Patrick Steinhardt committed -
This makes it easier to pass connection-related options around (proxy & custom headers for now). This fixes a bug in git_push_finish, which didn't reuse the provided proxy if the connection closed between the call to `git_remote_push` and the finish step.
Etienne Samson committed
-
- 06 Sep, 2018 16 commits
-
-
docs: clarify and include licenses of dependencies
Edward Thomson committed -
config_file: fix quadratic behaviour when adding config multivars
Edward Thomson committed -
In case where we add multiple configuration entries with the same key to a diskfile backend, we always need to iterate the list of this key to find the last entry due to the list being a singly-linked list. This is obviously quadratic behaviour, and this has sure enough been found by oss-fuzz by generating a configuration file with 50k lines, where most of them have the same key. While the issue will not arise with "sane" configuration files, an adversary may trigger it by providing a crafted ".gitmodules" file, which is delivered as part of the repo and also parsed by the configuration parser. The fix is trivial: store a pointer to the last entry of the list in its head. As there are only two locations now where we append to this data structure, mainting this pointer is trivial, too. We can also optimize retrieval of a single value via `config_get`, where we previously had to chase the `next` pointer to find the last entry that was added. Using our configuration file fozzur with a corpus that has a single file with 50000 "-=" lines previously took around 21s. With this optimization the same file scans in about 0.053s, which is a nearly 400-fold improvement. But in most cases with a "normal" amount of same-named keys it's not going to matter anyway.
Patrick Steinhardt committed -
Windows lacks %F and %T formats for strftime. Expand them to the year/month/day and hour/minute/second formats, respectively.
Edward Thomson committed -
Our build YAML is becoming unweildly and full of copy-pasta. Simplify with templates.
Edward Thomson committed -
Explicitly run from the build directory, not the source. (I was mistaken about the default working directory for VSTS agents.)
Edward Thomson committed -
CMake treats backslashes as escape characters; use forward slashes for the XML output path.
Edward Thomson committed -
Edward Thomson committed
-
Edward Thomson committed
-
Remove the global summary filename and file pointer; pass them in to the summary functions as needed. Error check the results of buffered I/O calls.
Edward Thomson committed -
Introduce a CLAR_XML option, to run the `ctest` commands with the new `-r` flag to clar. Permitted values are `OFF`, `ON` and a directory to write the XML test results to.
Edward Thomson committed -
Accept an (optional) value for the summary filename. Continues to default to summary.xml.
Edward Thomson committed -
Edward Thomson committed
-
Etienne Samson committed
-
Etienne Samson committed
-
This makes it possible to keep track of every test status (even successful ones), and their errors, if any.
Etienne Samson committed
-