Fixed a bug where TreeEntries were getting cached, (thanks @filipnavara) #139

Merged
lunny merged 1 commits from Kasi-R/master into master 2019-01-16 03:17:41 +00:00
Owner

Author: @Kasi-R

Fixes the bug described at https://github.com/go-gitea/git/pull/123#issuecomment-452340523

Author: @Kasi-R Fixes the bug described at https://github.com/go-gitea/git/pull/123#issuecomment-452340523
Author
Owner

Author: @codecov-io

Codecov Report

Merging #139 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #139   +/-   ##
=======================================
  Coverage   32.46%   32.46%           
=======================================
  Files          28       28           
  Lines        1814     1814           
=======================================
  Hits          589      589           
  Misses       1148     1148           
  Partials       77       77
Impacted Files Coverage Δ
tree.go 53.06% <0%> (ø) ⬆️

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 c811eb4...241f254. Read the comment docs.

Author: @codecov-io # [Codecov](https://codecov.io/gh/go-gitea/git/pull/139?src=pr&el=h1) Report > Merging [#139](https://codecov.io/gh/go-gitea/git/pull/139?src=pr&el=desc) into [master](https://codecov.io/gh/go-gitea/git/commit/c811eb4fb0f1fbde0174c298b418c9fca25ab09e?src=pr&el=desc) will **not change** coverage. > The diff coverage is `0%`. [![Impacted file tree graph](https://codecov.io/gh/go-gitea/git/pull/139/graphs/tree.svg?width=650&token=sCATTcwuUJ&height=150&src=pr)](https://codecov.io/gh/go-gitea/git/pull/139?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #139 +/- ## ======================================= Coverage 32.46% 32.46% ======================================= Files 28 28 Lines 1814 1814 ======================================= Hits 589 589 Misses 1148 1148 Partials 77 77 ``` | [Impacted Files](https://codecov.io/gh/go-gitea/git/pull/139?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [tree.go](https://codecov.io/gh/go-gitea/git/pull/139/diff?src=pr&el=tree#diff-dHJlZS5nbw==) | `53.06% <0%> (ø)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/go-gitea/git/pull/139?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/go-gitea/git/pull/139?src=pr&el=footer). Last update [c811eb4...241f254](https://codecov.io/gh/go-gitea/git/pull/139?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Author
Owner

Author: @filipnavara

On second thought, the entriesRecursiveParsed and entriesParsed variables are actually never set. Either that should be fixed too, or the cache can be removed entirely (since it was never working anyway).

Sorry, should have noticed that earlier, but I was blindly following the code when updating my forked code base.

Author: @filipnavara On second thought, the `entriesRecursiveParsed` and `entriesParsed` variables are actually never set. Either that should be fixed too, or the cache can be removed entirely (since it was never working anyway). _Sorry, should have noticed that earlier, but I was blindly following the code when updating my forked code base._
Author
Owner

Author: @Kasi-R

I guess i can add the caching check to both functions.

Edit: Updated the caching flag. Squashed the two commits.

Author: @Kasi-R I guess i can add the caching check to both functions. Edit: Updated the caching flag. Squashed the two commits.
Author
Owner

Author: @lunny

Please send a upgrade PR to go-gitea/gitea

Author: @lunny Please send a upgrade PR to go-gitea/gitea
This repo is archived. You cannot comment on pull requests.
No description provided.