You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ifgit_model.ErrLFSObjectNotExist (i.e. the content is missing) do nothing, including skipping the following block (because err != nil => meta == nil). This is an implicit fallback to the previous value of dataRc, which was the pointer file itself.
So my code in view.go needs to be tweaked to have the same sort of failover. And isAnnexFile should only be set if both the pointer and the content were successfully read.
The text was updated successfully, but these errors were encountered:
In #22 I decided to show a 404 if annex content is missing:
test setup
caused by this code:
https://github.com/neuropoly/gitea/blob/86630f4970824a7aa5f2e3ce5e060a3b41ddbcf1/routers/web/repo/view.go#L440-L452
But I just tested with Git LFS, by using the delete button in the LFS UI
test setup
causing the first of these files to be missing its content
and in this case the missing file renders the LFS pointer as plaintext:
This is subtle, I missed this in their code when I was putting in the annex version; they do
https://github.com/neuropoly/gitea/blob/86630f4970824a7aa5f2e3ce5e060a3b41ddbcf1/routers/web/repo/view.go#L400-L407
so:
git_model.ErrLFSObjectNotExist
(i.e. the content is missing) do nothing, including skipping the following block (because err != nil => meta == nil). This is an implicit fallback to the previous value ofdataRc
, which was the pointer file itself.So my code in view.go needs to be tweaked to have the same sort of failover. And
isAnnexFile
should only be set if both the pointer and the content were successfully read.The text was updated successfully, but these errors were encountered: