Skip to content

Display file mode changes #23159

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

Closed
wants to merge 7 commits into from

Conversation

stuzer05
Copy link
Contributor

@stuzer05 stuzer05 commented Feb 26, 2023

image

Closes #23021

@GiteaBot GiteaBot added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 26, 2023
@delvh delvh added this to the 1.20.0 milestone Feb 26, 2023
@delvh delvh added type/enhancement An improvement of existing functionality outdated/backport/v1.19 This PR should be backported to Gitea 1.19 labels Feb 26, 2023
@stuzer05 stuzer05 requested a review from delvh April 18, 2023 04:19
@@ -577,9 +579,19 @@ parsingLoop:
break curFileLoop
case strings.HasPrefix(line, "old mode ") ||
strings.HasPrefix(line, "new mode "):

if strings.HasPrefix(line, "old mode ") {
curFile.OldMode = strings.ReplaceAll(line, "old mode ", "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it should be TrimPrefix and then TrimSpace, because there is a line below strings.HasSuffix(line, " 160000\n")

silverwind added a commit that referenced this pull request May 29, 2023
This MR introduces the addition of file mode display support for both
new file creation and file mode changes, following a similar approach as
GitLab.

GitLab:

![изображение](https://github.com/go-gitea/gitea/assets/1969460/4c0d0d74-30b2-486c-ac12-ef2355b04c96)


Gitea:

![изображение](https://github.com/go-gitea/gitea/assets/1969460/8237fe99-2507-42c0-a40c-cd52ad355ab7)

Replaces: #23159
Closes: #23021

---------

Co-authored-by: silverwind <[email protected]>
Co-authored-by: delvh <[email protected]>
Co-authored-by: Giteabot <[email protected]>
@wxiaoguang wxiaoguang added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label May 29, 2023
@delvh delvh removed this from the 1.20.0 milestone Jun 3, 2023
@delvh
Copy link
Member

delvh commented Jun 3, 2023

Given that #24966 was merged, I think we can close this PR?

@delvh delvh closed this Jun 3, 2023
@stuzer05 stuzer05 deleted the git-show-filemode-chages branch June 3, 2023 16:11
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display file mode changes
4 participants