Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

difftree: simplify hash comparison with deprecated files modes #300

Merged
merged 1 commit into from
Mar 4, 2017
Merged

difftree: simplify hash comparison with deprecated files modes #300

merged 1 commit into from
Mar 4, 2017

Conversation

alcortesm
Copy link
Contributor

Difftree hash comparisson was quite complex because the hashes of
deprecated files were diferent from the hashes of regular files. But
git's difftree really treat these kind of files as equal.

This patch fix this by making treenoder generate the hash for deprecated
files as if they were regular files. This means the difftree hash comparison
function is now just a call to bytes.Equal.

Difftree hash comparisson was quite complex because the hashes of
deprecated files were diferent from the hashes of regular files.  But
git's difftree really treat them as equal.

This patch fix this by making treenoder return the same hash for regular
files than for deprecated files; now the hash comparison function is
just a bytes.Equal call.
@codecov
Copy link

codecov bot commented Mar 3, 2017

Codecov Report

Merging #300 into master will decrease coverage by -0.04%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #300      +/-   ##
==========================================
- Coverage   77.22%   77.19%   -0.04%     
==========================================
  Files         117      117              
  Lines        7948     7937      -11     
==========================================
- Hits         6138     6127      -11     
  Misses       1159     1159              
  Partials      651      651
Impacted Files Coverage Δ
plumbing/object/difftree.go 77.77% <100%> (-13.14%)
plumbing/object/treenoder.go 80.35% <100%> (+0.72%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 047a795...b3aa41a. Read the comment docs.

@mcuadros mcuadros merged commit f64e4b8 into src-d:master Mar 4, 2017
@alcortesm alcortesm deleted the improvement-difftree-simplify-deprecated branch March 6, 2017 08:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants