FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use the sorted input in the tree updater by carlosmn · Pull Request #4003 · libgit2/libgit2 · GitHub

Repository navigation

Use the sorted input in the tree updater - #4003

Merged
ethomson merged 3 commits into
masterfrom
cmn/tree-updater-ordering
Nov 14, 2016
Merged

ethomson merged 3 commits into
masterfrom
cmn/tree-updater-ordering

Conversation

Copy link
Copy Markdown
Member

The loop/algo is made to assume that we have sorted inputs. We sort them to make sure but we failed to actually use the sorted list. The tests were inadvertently written with inputs that did not show this bad behaviour.

This fixes #3804

We do not currently use the sorted version of this input in the
function, which means we produce bad results.
The loop is made with the assumption that the inputs are sorted and not
using it leads to bad outputs.
We look at whether we're trying to replace a blob with a tree during the
update phase, but we fail to look at whether we've just inserted a blob
where we're now trying to insert a tree.

Update the check to look at both places. The test for this was
previously succeeding due to the bu where we did not look at the sorted
output.
carlosmn added this to the libgit2 v0.25 - Rutschgefahr milestone Nov 14, 2016

Copy link
Copy Markdown
Member

👍

ethomson merged commit df045ce into master Nov 14, 2016
carlosmn deleted the cmn/tree-updater-ordering branch November 15, 2016 11:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tree updater does not use the sorted inputs

2 participants


Back | FazBrowse Home | New Git URL