Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch description #22639

Open
Utopiah opened this issue Jan 28, 2023 · 5 comments
Open

Branch description #22639

Utopiah opened this issue Jan 28, 2023 · 5 comments
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. type/upstream This is an issue in one of Gitea's dependencies and should be reported there

Comments

@Utopiah
Copy link

Utopiah commented Jan 28, 2023

Feature Description

Branches have name and content but no description that would describe what they are or should be. Being able to use git branch --edit-description on remote and display back on Gitea on e.g /user_name/repository_name/src/branch/branch_name or /user_name/repository_name/branches would be quite useful for people browsing a repository.

Screenshots

No response

@Utopiah Utopiah added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Jan 28, 2023
@lafriks
Copy link
Member

lafriks commented Jan 28, 2023

Branch descriptions are stored locally in git config and can not be pushed to remote thus unless git client implements this feature there is not much we can do

@Utopiah
Copy link
Author

Utopiah commented Jan 28, 2023

Thanks, asked on git-devel IRC and will report back.

@eeyrjmr
Copy link
Contributor

eeyrjmr commented Jan 28, 2023

could the README.md be used for this since it is rendered in the view and thus can be unique per branch

@delvh
Copy link
Member

delvh commented Jan 28, 2023

I don't think that's a good idea.
How many READMEs do you know that are changed on branches except main?
I don't know of any.
And showing the whole README is not the point of showing a small branch description.

@lunny lunny added the type/upstream This is an issue in one of Gitea's dependencies and should be reported there label May 9, 2023
@lunny
Copy link
Member

lunny commented Jun 16, 2023

If #22743 merged, we can add a column in database to store the description.

lunny added a commit that referenced this issue Jun 29, 2023
Related #14180
Related #25233 
Related #22639
Close #19786
Related #12763 

This PR will change all the branches retrieve method from reading git
data to read database to reduce git read operations.

- [x] Sync git branches information into database when push git data
- [x] Create a new table `Branch`, merge some columns of `DeletedBranch`
into `Branch` table and drop the table `DeletedBranch`.
- [x] Read `Branch` table when visit `code` -> `branch` page
- [x] Read `Branch` table when list branch names in `code` page dropdown
- [x] Read `Branch` table when list git ref compare page
- [x] Provide a button in admin page to manually sync all branches.
- [x] Sync branches if repository is not empty but database branches are
empty when visiting pages with branches list
- [x] Use `commit_time desc` as the default FindBranch order by to keep
consistent as before and deleted branches will be always at the end.

---------

Co-authored-by: Jason Song <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. type/upstream This is an issue in one of Gitea's dependencies and should be reported there
Projects
None yet
Development

No branches or pull requests

5 participants