8000 Ignore files in diff with check-attr by KN4CK3R · Pull Request #16262 · go-gitea/gitea · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ignore files in diff with check-attr #16262

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

Conversation

KN4CK3R
Copy link
Member
@KN4CK3R KN4CK3R commented Jun 26, 2021

fixes #12653
close #16250

This PR moves the .gitattribute file from the root of the default branch into repo.git/info/attributes after every push. The diff supports now the linguist-generated keyword and hides these file in the output.
test

@KN4CK3R KN4CK3R added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jun 26, 2021
@KN4CK3R KN4CK3R added this to the 1.16.0 milestone Jun 26, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #16262 (a7eaa72) into main (0393a57) will increase coverage by 1.24%.
The diff coverage is 49.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16262      +/-   ##
==========================================
+ Coverage   44.24%   45.48%   +1.24%     
==========================================
  Files         695      709      +14     
  Lines       82341    83456    +1115     
==========================================
+ Hits        36429    37960    +1531     
+ Misses      40014    39420     -594     
- Partials     5898     6076     +178     
Impacted Files Coverage Δ
cmd/generate.go 0.00% <0.00%> (ø)
cmd/hook.go 0.00% <0.00%> (ø)
models/action.go 47.12% <ø> (ø)
models/oauth2.go 28.00% <0.00%> (-1.17%) ⬇️
models/repo_archiver.go 0.00% <0.00%> (ø)
models/user.go 52.32% <ø> (-1.07%) ⬇️
modules/context/repo.go 52.99% <0.00%> (-0.30%) ⬇️
modules/generate/generate.go 0.00% <0.00%> (-16.00%) ⬇️
modules/git/error.go 50.00% <0.00%> (-4.24%) ⬇️
modules/git/last_commit_cache_nogogit.go 35.84% <ø> (+0.66%) ⬆️
... and 229 more

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 837e8b3...a7eaa72. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 26, 2021
Copy link
Contributor
@kdumontnu kdumontnu left a comment

Choose a reason for hiding this comment

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

👍

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 3, 2021
@lafriks
Copy link
Member
lafriks commented Jul 10, 2021

I think it should also set IsGenerated by using go-enry method IsGenerated

@lunny
Copy link
Member
lunny commented Aug 22, 2021

Is it really necessary to sync .gitattribute to repo.git/info/attributes?

zeripath added a commit that referenced this pull request Sep 9, 2021
…guage stats and diffs (#16773)

Replaces #16262
Replaces #16250
Replaces #14833

This PR first implements a `git check-attr` pipe reader - using `git check-attr --stdin -z --cached` - taking account of the change in the output format in git 1.8.5 and creates a helper function to read a tree into a temporary index file for that pipe reader.

It then wires this in to the language stats helper and into the git diff generation.

Files which are marked generated will be folded by default.

Fixes #14786
Fixes #12653
@a1012112796
Copy link
Member

@zeripath close?

@zeripath
Copy link
Contributor

yeah I think this has been replaced.

@zeripath zeripath closed this Sep 10, 2021
@KN4CK3R KN4CK3R deleted the feature-gitattributes-checkattr branch September 12, 2021 15:46
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Ability to exclude files from diffs
8 participants
0