G-Node / G-Node/gogs

"File content is not available" is figured when TextFile which content contains '/annex/objects' strings.

Open
#129 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
16
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Hi, G-Node/gogs Team.
I'm developer from Japan who fork "G-Node/gogs".

I want to ask you this issue.

**Describe the bug**

1. go myRepository page.
2. click "New File" button.
3. enter filename(issue.txt) and contents of this text file.
this text file contetns is "this text contains '/annex/objects' strings".

![image](https://user-images.githubusercontent.com/81957555/181481947-3dfaa646-d29c-4f21-9572-e71c4276c882.png)

4. commit this text file.
5. figured "File content is not available" sentence and i cant see text file's contents.

![image](https://user-images.githubusercontent.com/81957555/181482678-2755a185-e424-4640-915b-45b227d4d7cf.png)

**GIN version and commit**
Live branch which tags [gin-live-2020-10-24](https://github.com/G-Node/gogs/releases/tag/gin-live-2020-10-24)

**Operating system**
Linux ubuntu 5.15.0-41-generic #44~20.04.1-Ubuntu SMP Fri Jun 24 13:27:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

**Database**
postgres

**To Reproduce**
show you in "Describe the bug" chapter

**Expected behavior**
can get and see the file contents.

**Actual behavior**
can't get and see the file contents.

**Additional context**
I think this contents is treated as Git-Aneexed contents.
when I look source code (internal\tool\file.go), it said.

![image](https://user-images.githubusercontent.com/81957555/181491631-db1c4935-a5d4-43e4-886b-c58db33ba42c.png)

This code treats git-saved text file which contains '/annex/objects' strings as git-Aneex saved file.
Is this code right?

I want to know the reason why this judgementis needed.
What kind of cases require this judgement?

I think git-annex saved file is symlink.
So, It's enough to check symlink or not.

If there are any mistakes in my understanding please let me know.

sincerely yours,
Nozomu Akaike.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.