- 14 Mar, 2017 4 commits
-
-
In a diff, the shortest possible hunk with a modification (that is, no deletion) results from a file with only one line with a single character which is removed. Thus the following hunk @@ -1 +1 @@ -a + is the shortest valid hunk modifying a line. The function parsing the hunk body though assumes that there must always be at least 4 bytes present to make up a valid hunk, which is obviously wrong in this case. The absolute minimum number of bytes required for a modification is actually 2 bytes, that is the "+" and the following newline. Note: if there is no trailing newline, the assumption will not be offended as the diff will have a line "\ No trailing newline" at its end. This patch fixes the issue by lowering the amount of bytes required.
Patrick Steinhardt committed -
Now that the `git_diff_foreach` function does not depend on internals of the `git_patch_generated` structure anymore, we can easily move it to the actual diff code.
Patrick Steinhardt committed -
The current logic of `git_diff_foreach` makes the assumption that all diffs passed in are actually derived from generated diffs. With these assumptions we try to derive the actual diff by inspecting either the working directory files or blobs of a repository. This obviously cannot work for diffs parsed from a file, where we do not necessarily have a repository at hand. Since the introduced split of parsed and generated patches, there are multiple functions which help us to handle patches generically, being indifferent from where they stem from. Use these functions and remove the old logic specific to generated patches. This allows re-using the same code for invoking the callbacks on the deltas.
Patrick Steinhardt committed -
Under the existing logic, we try to load patch contents differently, depending on whether the patch files stem from the working directory or not. But actually, the executed code paths are completely equal to each other -- so we were always the code despite the condition. Remove the condition altogether and conflate both code paths.
Patrick Steinhardt committed
-
- 11 Mar, 2017 2 commits
-
-
Skip uninteresting commits in revwalk timesort iterator
Carlos Martín Nieto committed -
git_futils_readbuffer: don't compute sha-1
Carlos Martín Nieto committed
-
- 09 Mar, 2017 3 commits
-
-
rebase: ignore untracked files in submodules
Edward Thomson committed -
Fixes #4099
Adam Niedzielski committed -
Don't compute the sha-1 in `git_futils_readbuffer_updated` unless the checksum was requested. This means that `git_futils_readbuffer` will not calculate the checksum unnecessarily.
Edward Thomson committed
-
- 06 Mar, 2017 3 commits
-
-
Support namespaced references again
Edward Thomson committed -
Edward Thomson committed
-
These simple tests only ensure that we enforce the existence of a namespace; these mirror the rugged tests, they are not exhaustive.
Edward Thomson committed
-
- 03 Mar, 2017 8 commits
-
-
An untracked file in a submodule should not prevent a rebase from starting. Even if the submodule's SHA is changed, and that file would conflict with a new tracked file, it's still OK to start the rebase and discover the conflict later. Signed-off-by: David Turner <dturner@twosigma.com>
David Turner committed -
git_commit_create: freshen tree objects in commit
Carlos Martín Nieto committed -
Freshen the tree object that a commit points to during commit time.
Edward Thomson committed -
Introduce (optional) SHA1 collision attack detection
Carlos Martín Nieto committed -
We never set `SHA1_TYPE` to `builtin`. Don't bother testing for it.
Edward Thomson committed -
Edward Thomson committed
-
Include the SHA1 collision attack detection library from https://github.com/cr-marcstevens/sha1collisiondetection
Edward Thomson committed -
Edward Thomson committed
-
- 01 Mar, 2017 5 commits
-
-
cmake: only enable supported compiler warning flags
Patrick Steinhardt committed -
We currently unconditionally enable the "-Wall" and "-Wextra" flags. Some platforms rely on compilers which do not support these flags, though. One of these platforms is Haiku, which does not support "-Wextra" due to being stuck on GCC version 2. Fix builds on such platforms by adding these flags only if supported by the compiler.
Patrick Steinhardt committed -
tests: refs::create: fix memory leak
Patrick Steinhardt committed -
Patrick Steinhardt committed
-
Fix: make reflog include "(merge)" for merge commits
Patrick Steinhardt committed
-
- 28 Feb, 2017 1 commit
-
-
This test ensures that the string '(merge)' is included in the reflog when a merge commit is made.
Richard Ipsum committed
-
- 27 Feb, 2017 1 commit
-
-
This fixes issue #4094
Richard Ipsum committed
-
- 26 Feb, 2017 4 commits
-
-
tests: Add create__symbolic_with_arbitrary_content
Edward Thomson committed -
Fix minor typos in CONVENTIONS.md
Edward Thomson committed -
Fix inet_pton tests triggering an assert in Haiku
Edward Thomson committed -
Patrick Blesi committed
-
- 25 Feb, 2017 4 commits
-
-
Haiku will assert in a nightly build if the "dst" input to inet_pton() is NULL.
Kevin Wojniak committed -
Use C style comments as per style guide, and fix mismatching indentation.
Richard Ipsum committed -
This test ensures that it's possible to create a symbolic ref that has arbitrary data as its target. It also ensures it's possible to obtain the target of that symbolic reference from the git_reference object.
Richard Ipsum committed -
appveyor: don't rewrite the system mingw
Edward Thomson committed
-
- 24 Feb, 2017 3 commits
-
-
Download mingw-w64 into our build directory and execute it there, don't try to overwrite the system's mingw.
Edward Thomson committed -
The 'appveyor' branch is useful for testing AppVeyor builds.
Edward Thomson committed -
fix regression from #4092
Patrick Steinhardt committed
-
- 22 Feb, 2017 2 commits
-
-
Fixes a regression from #4092. This is a crash on 32-bit and I assume that it doesn't do the right thing on 64-bit either. MSVC emits a warning for this, but of course, it's easy to get lost among all of the similar 'possible loss of data' warnings.
Jason Haslam committed -
Attrcache cleanups
Carlos Martín Nieto committed
-