-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Use native git variants by default with go-git variants as build tag #13673
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
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
c76d2ad
Move last commit cache back into modules/git
zeripath fd69b5b
Remove go-git from the interface for last commit cache
zeripath 2013955
move cacheref to last_commit_cache
zeripath 58f0579
Remove go-git from routers/private/hook
zeripath d45a18f
Move FindLFSFiles to pipeline
zeripath 164a02e
Make no-go-git variants
zeripath 764948f
Submodule RefID
zeripath d8d498d
fix issue with GetCommitsInfo
zeripath abddc4e
fix GetLastCommitForPaths
zeripath 1e396b7
Improve efficiency
zeripath 4b35e94
More efficiency
zeripath 95d6652
even faster
zeripath 20632e2
Reduce duplication
zeripath a35cf18
As per @lunny
zeripath b047f93
attempt to fix drone
zeripath e89fd10
Merge remote-tracking branch 'origin/master' into no-go-git
zeripath 55f4e03
fix test-tags
zeripath bb593f4
Merge branch 'master' into no-go-git
zeripath 8c887fc
default to use no-go-git variants and add gogit build tag
zeripath 18da9de
Merge branch 'no-go-git' of github.com:zeripath/gitea into no-go-git
zeripath e1b923e
Merge remote-tracking branch 'origin/master' into no-go-git
zeripath 1897dad
placate lint
zeripath 531da0f
Merge branch 'master' into no-go-git
zeripath 03c8cd6
Merge branch 'master' into no-go-git
zeripath 4633679
Merge branch 'master' into no-go-git
6543 320adb4
as per @6543
zeripath 5582fba
Merge branch 'master' into no-go-git
zeripath 39c8dfe
Merge branch 'master' into no-go-git
techknowlogick 29a5951
Merge branch 'master' into no-go-git
6543 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,14 @@ import ( | |
api "code.gitea.io/gitea/modules/structs" | ||
"code.gitea.io/gitea/modules/util" | ||
|
||
"github.com/go-git/go-git/v5/plumbing/object" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestToCommitMeta(t *testing.T) { | ||
assert.NoError(t, models.PrepareTestDatabase()) | ||
headRepo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) | ||
sha1, _ := git.NewIDFromString("0000000000000000000000000000000000000000") | ||
signature := &object.Signature{Name: "Test Signature", Email: "[email protected]", When: time.Unix(0, 0)} | ||
signature := &git.Signature{Name: "Test Signature", Email: "[email protected]", When: time.Unix(0, 0)} | ||
tag := &git.Tag{ | ||
Name: "Test Tag", | ||
ID: sha1, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I'm late here but is it really necessary to run the linter twice here? Do
TAGS
really affect the linting result? I thoughtTAGS
only affect the build.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's beyond me to understand how TAGS can affect linting (which should just be a static analysis of files). Care to explain? Does the go linter actually do runtime analysis as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golangci-lint has a
--build-tags
to support lint different tags.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I guess I need to study
golangci-lint
more. I was under the impression that linters in general just do static analysis of file contents, but I guess this linter does more than that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought I generally wonder if it's really necessary to do this double linting every single CI run. The go linting already takes around 3 minutes per run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that the go-git variants require linting too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just pass a list of files to the linters as argument? I think it should be possible.