You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/models
wxiaoguang a0051634b9
Refactor git module, make Gitea use internal git config (#19732)
* Refactor git module, make Gitea use internal git config, add safe.directory config

* introduce git.InitSimple and git.InitWithConfigSync, make serv cmd use gitconfig

* use HOME instead of GIT_CONFIG_GLOBAL, because git always needs a correct HOME

* fix cmd env in cmd/serv.go

* fine tune error message

* Fix a incorrect test case

* fix configAddNonExist

* fix configAddNonExist logic, add `--fixed-value` flag, add tests

* add configSetNonExist function in case it's needed.

* use configSetNonExist for `user.name` and `user.email`

* add some comments

* Update cmd/serv.go

Co-authored-by: zeripath <art27@cantab.net>

* Update cmd/serv.go

Co-authored-by: zeripath <art27@cantab.net>

* Update modules/git/git.go

Co-authored-by: zeripath <art27@cantab.net>

* Update modules/setting/setting.go

Co-authored-by: zeripath <art27@cantab.net>

* Update modules/git/repo_attribute.go

Co-authored-by: zeripath <art27@cantab.net>

* fix spaces in messages

* use `configSet("core.protectNTFS", ...)` instead of `globalCommandArgs`

* remove GIT_CONFIG_NOSYSTEM, continue to use system's git config

* Update cmd/serv.go

Co-authored-by: zeripath <art27@cantab.net>

* fix merge

* remove code for safe.directory

* separate git.CommonEnvs to CommonGitCmdEnvs and CommonCmdServEnvs

* avoid Golang's data race error

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 years ago
..
admin Use a struct as test options (#19393) 2 years ago
appstate Sync gitea app path for git hooks and authorized keys when starting (#17335) 3 years ago
asymkey Move some repository related code into sub package (#19711) 2 years ago
auth Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
avatars format with gofumpt (#18184) 2 years ago
db Move some repository related code into sub package (#19711) 2 years ago
fixtures Exclude Archived repos from Dashboard Milestones (#19882) 2 years ago
foreignreference Store the foreign ID of issues during migration (#18446) 2 years ago
issues Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
migrations Refactor git module, make Gitea use internal git config (#19732) 2 years ago
organization Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
packages Add Helm Chart registry (#19406) 2 years ago
perm Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
project Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
pull Delete related PullAutoMerge and ReviewState on User/Repo Deletion (#19649) 2 years ago
repo Feature: Find files in repo (#15028) 2 years ago
unit Fix incorrect translation key (#19744) 2 years ago
unittest Refactor git module, make Gitea use internal git config (#19732) 2 years ago
user Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
webhook Move some repository related code into sub package (#19711) 2 years ago
action.go Move some repository related code into sub package (#19711) 2 years ago
action_list.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
action_test.go GetFeeds must always discard actions with dangling repo_id (#19598) 2 years ago
branches.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
branches_test.go more context for models (#19511) 2 years ago
commit.go Collaborator trust model should trust collaborators (#18539) 2 years ago
commit_status.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
commit_status_test.go Move repository model into models/repo (#17933) 3 years ago
consistency.go Fix order by parameter (#19849) 2 years ago
consistency_test.go [doctor] Add check/fix for bogus action rows (#19656) 2 years ago
engine_test.go Refactor install page (db type) (#17919) 3 years ago
error.go Delete related PullAutoMerge and ReviewState on User/Repo Deletion (#19649) 2 years ago
fixture_generation.go Move access and repo permission to models/perm/access (#19350) 2 years ago
fixture_test.go Decouple unit test code from business code (#17623) 3 years ago
issue.go Move some repository related code into sub package (#19711) 2 years ago
issue_assignees.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_assignees_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_comment.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_comment_list.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_comment_test.go Propagate context and ensure git commands run in request context (#17868) 2 years ago
issue_dependency.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_dependency_test.go Use for a repo action one database transaction (#19576) 2 years ago
issue_label.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_label_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_list.go Move some repository related code into sub package (#19711) 2 years ago
issue_list_test.go Decouple unit test, remove intermediate `unittestbridge` package (#17662) 3 years ago
issue_lock.go Move milestone to models/issues/ (#19278) 2 years ago
issue_project.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_stopwatch.go Only return valid stopwatches (#19863) 2 years ago
issue_stopwatch_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_tracked_time.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_tracked_time_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_user.go Move some repository related code into sub package (#19711) 2 years ago
issue_user_test.go Move repository model into models/repo (#17933) 3 years ago
issue_watch.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_watch_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_xref.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
issue_xref_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
lfs.go Move some repository related code into sub package (#19711) 2 years ago
lfs_lock.go Move access and repo permission to models/perm/access (#19350) 2 years ago
main_test.go Use a struct as test options (#19393) 2 years ago
migrate.go Move milestone to models/issues/ (#19278) 2 years ago
migrate_test.go Move milestone to models/issues/ (#19278) 2 years ago
notification.go Move some repository related code into sub package (#19711) 2 years ago
notification_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
org.go Move some repository related code into sub package (#19711) 2 years ago
org_team.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
org_team_test.go Move access and repo permission to models/perm/access (#19350) 2 years ago
org_test.go Move organization related structs into sub package (#18518) 2 years ago
protected_tag.go Move organization related structs into sub package (#18518) 2 years ago
protected_tag_test.go Move repository model into models/repo (#17933) 3 years ago
pull.go Make WIP prefixes case insensitive, e.g. allow `Draft` as a WIP prefix (#19780) 2 years ago
pull_list.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
pull_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
release.go improvement some release related code (#19867) 2 years ago
repo.go Move some repository related code into sub package (#19711) 2 years ago
repo_activity.go Fix some slice problems (incorrect slice length) (#19592) 2 years ago
repo_collaboration.go Fix order by parameter (#19849) 2 years ago
repo_collaboration_test.go Move access and repo permission to models/perm/access (#19350) 2 years ago
repo_permission_test.go Move access and repo permission to models/perm/access (#19350) 2 years ago
repo_test.go Move some repository related code into sub package (#19711) 2 years ago
repo_transfer.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
repo_transfer_test.go Move repository model into models/repo (#17933) 3 years ago
review.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
review_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
statistic.go Estimate Action Count in Statistics (#19775) 2 years ago
task.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
token.go Use base32 for 2FA scratch token (#18384) 2 years ago
token_test.go A better go code formatter, and now `make fmt` can run in Windows (#17684) 3 years ago
upload.go Remove NewSession method from db.Engine interface (#17577) 3 years ago
user.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2 years ago
user_heatmap.go Move organization related structs into sub package (#18518) 2 years ago
user_heatmap_test.go RSS/Atom support for Repos (#19055) 2 years ago
user_test.go Move organization related structs into sub package (#18518) 2 years ago