- 16 Feb, 2018 3 commits
-
-
Even though the `entry` variable will always be initialized when `read_entry` returns success and even though we never dereference `entry` in case `read_entry` fails, GCC prints a warning about uninitialized use. Just initialize the pointer to `NULL` in order to shut GCC up.
Patrick Steinhardt committed -
The strict aliasing rules disallow dereferencing the pointer to a variable of a certain type as another type, which is frequently used e.g. when casting structs to their base type. We currently have the warning level for strict aliasing rules set to `2`, which is described by gcc(1) as being "Aggressive, quick, not too precise." And in fact, we experience quite a lot of warnings when doing a release build due to that. GCC provides multiple levels, where higher levels are more accurate, but also slower due to the additional analysis required. Still, we want to have warning level 3 instead of 2 to avoid the current warnings we have in the Travis CI release builds. As this is the default warning level when no level is passed to `-Wstrict-aliasing`, we can just remove the level and use that default.
Patrick Steinhardt committed -
When verifying the server certificate, we do try to make sure that the hostname actually matches the certificate alternative names. In cases where the host is either an IPv4 or IPv6 address, we have to compare the binary representations of the hostname with the declared IP address of the certificate. We only do that comparison in case we were successfully able to parse the hostname as an IP, which would always result in the memory region being initialized. Still, GCC 6.4.0 was complaining about usage of non-initialized memory. Fix the issue by simply asserting that `addr` needs to be initialized. This shuts up the GCC warning.
Patrick Steinhardt committed
-
- 15 Feb, 2018 4 commits
-
-
docs: fix typo in "release.md" filename
Patrick Steinhardt committed -
Patrick Steinhardt committed
-
docs: add release documentation
Patrick Steinhardt committed -
CHANGELOG: update for v0.27.0
Patrick Steinhardt committed
-
- 10 Feb, 2018 2 commits
-
-
http: standardize user-agent addition
Edward Thomson committed -
The winhttp and posix http each need to add the user-agent to their requests. Standardize on a single function to include this so that we do not get the version numbers we're sending out of sync. Assemble the complete user agent in `git_http__user_agent`, returning assembled strings. Co-authored-by: Patrick Steinhardt <ps@pks.im>
Edward Thomson committed
-
- 09 Feb, 2018 14 commits
-
-
Plug resource leaks
Edward Thomson committed -
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
odb: error when we can't alloc an object
Edward Thomson committed -
Edward Thomson committed
-
Return an error to the caller when we can't create an object header for some reason (printf failure) instead of simply asserting.
Edward Thomson committed -
There's no recovery possible if we're so confused or corrupted that we're trying to overwrite our memory. Simply assert.
Edward Thomson committed -
Edward Thomson committed
-
Provide error messages on hash failures: assert when given invalid input instead of failing with a user error; provide error messages on program errors.
Edward Thomson committed -
It's unlikely that we'll fail to allocate a single byte, but let's check for allocation failures for good measure. Untangle `-1` being a marker of not having found the hardcoded odb object; use that to reflect actual errors.
Edward Thomson committed -
At the moment, we're swallowing the allocation failure. We need to return the error to the caller.
Edward Thomson committed -
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
- 08 Feb, 2018 7 commits
-
-
Streaming read support for the loose ODB backend
Edward Thomson committed -
Recursive merge: reverse the order of merge bases
Edward Thomson committed -
config: handle CRLF-only lines and BOM
Edward Thomson committed -
The function to detect a BOM takes an offset where it shall look for a BOM. No caller uses that, and searching for the BOM in the middle of a buffer seems to be very unlikely, as a BOM should only ever exist at file start. Remove the parameter, as it has already caused confusion due to its weirdness.
Patrick Steinhardt committed -
The function `skip_bom` is being used to detect and skip BOM marks previously to parsing a configuration file. To do so, it simply uses `git_buf_text_detect_bom`. But since the refactoring to use the parser interface in commit 9e66590b (config_parse: use common parser interface, 2017-07-21), the BOM detection was actually broken. The issue stems from a misunderstanding of `git_buf_text_detect_bom`. It was assumed that its third parameter limits the length of the character sequence that is to be analyzed, while in fact it was an offset at which we want to detect the BOM. Fix the parameter to be `0` instead of the buffer length, as we always want to check the beginning of the configuration file.
Patrick Steinhardt committed -
Currently, the configuration parser will fail reading empty lines with just an CRLF-style line ending. Special-case the '\r' character in order to handle it the same as Unix-style line endings. Add tests to spot this regression in the future.
Patrick Steinhardt committed -
Upon each line, the configuration parser tries to get either the first non-whitespace character or the first whitespace character, in case there is no non-whitespace character. The logic handling this looks rather odd and doesn't immediately convey this meaning, so add a comment to clarify what happens.
Patrick Steinhardt committed
-
- 07 Feb, 2018 1 commit
-
-
CMake: minor fixups
Edward Thomson committed
-
- 05 Feb, 2018 1 commit
-
-
Edward Thomson committed
-
- 04 Feb, 2018 7 commits
-
-
Our virtual commit must be the last argument to merge-base: since our algorithm pushes _both_ parents of the virtual commit, it needs to be the last argument, since merge-base: > Given three commits A, B and C, git merge-base A B C will compute the > merge base between A and a hypothetical commit M We want to calculate the merge base between the actual commit ("two") and the virtual commit ("one") - since one actually pushes its parents to the merge-base calculation, we need to calculate the merge base of "two" and the parents of one.
Tyrie Vella committed -
Edward Thomson committed
-
Virtual base building: ensure that the virtual base is created and revwalked in the same way as git.
Edward Thomson committed -
When the commits being merged have multiple merge bases, reverse the order when creating the virtual merge base. This is for compatibility with git's merge-recursive algorithm, and ensures that we build identical trees. Git does this to try to use older merge bases first. Per 8918b0c: > It seems to be the only sane way to do it: when a two-head merge is > done, and the merge-base and one of the two branches agree, the > merge assumes that the other branch has something new. > > If we start creating virtual commits from newer merge-bases, and go > back to older merge-bases, and then merge with newer commits again, > chances are that a patch is lost, _because_ the merge-base and the > head agree on it. Unlikely, yes, but it happened to me.
Edward Thomson committed -
Provide a simple function to reverse an oidarray.
Edward Thomson committed -
Edward Thomson committed
-
Conflict markers should match EOL style in conflicting files
Edward Thomson committed
-
- 03 Feb, 2018 1 commit
-
-
Move the odd code that provides a hierarchical display for projects within the IDEs to its own module.
Edward Thomson committed
-