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

remote: avoid expensive revlist operation when only deleting refs #567

Merged
merged 1 commit into from
Aug 28, 2017

Conversation

strib
Copy link
Contributor

@strib strib commented Aug 27, 2017

No description provided.

@codecov
Copy link

codecov bot commented Aug 27, 2017

Codecov Report

Merging #567 into master will decrease coverage by 0.58%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #567      +/-   ##
=========================================
- Coverage   77.98%   77.4%   -0.59%     
=========================================
  Files         129     129              
  Lines        9845    9851       +6     
=========================================
- Hits         7678    7625      -53     
- Misses       1328    1400      +72     
+ Partials      839     826      -13
Impacted Files Coverage Δ
remote.go 74.04% <77.77%> (+0.4%) ⬆️
plumbing/transport/ssh/common.go 20.54% <0%> (-45.21%) ⬇️
plumbing/transport/ssh/auth_method.go 31.57% <0%> (-22.81%) ⬇️

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 bff1d06...467cb2a. Read the comment docs.

@mcuadros
Copy link
Contributor

Any chance to cover this with a test?

@strib strib force-pushed the avoid-revlist-when-deleting branch from 5da0fcc to a7cfdb5 Compare August 28, 2017 17:14
@strib
Copy link
Contributor Author

strib commented Aug 28, 2017

@mcuadros: any idea what kind of test I could write for this? My best idea would be to use mocks somehow to make sure that the revlist method is never called, but I don't see precedent for mocks in the test right now, and don't have time to build that infrastructure out myself.

I guess I could just test for correctness when all refspecs are deletes, rather than testing for performance, but that test would pass both with and without this change.

@strib
Copy link
Contributor Author

strib commented Aug 28, 2017

I have no clue why this is reporting such a large test coverage difference. I'll try to throw together the simple correctness test and see if that helps.

@strib strib force-pushed the avoid-revlist-when-deleting branch from a7cfdb5 to 467cb2a Compare August 28, 2017 18:29
@mcuadros mcuadros merged commit 7aa9d15 into src-d:master Aug 28, 2017
@strib strib deleted the avoid-revlist-when-deleting branch August 28, 2017 18:39
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