0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-11 08:25:15 +01:00
gitea/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>
2022-06-10 09:57:49 +08:00
..
admin Use a struct as test options (#19393) 2022-04-14 21:58:21 +08:00
appstate
asymkey Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
auth Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
avatars
db Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
fixtures Exclude Archived repos from Dashboard Milestones (#19882) 2022-06-04 19:30:01 +01:00
foreignreference Store the foreign ID of issues during migration (#18446) 2022-03-17 18:08:35 +01:00
issues Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
migrations Refactor git module, make Gitea use internal git config (#19732) 2022-06-10 09:57:49 +08:00
organization Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
packages Add Helm Chart registry (#19406) 2022-04-19 12:55:35 -04:00
perm Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
project Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
pull Delete related PullAutoMerge and ReviewState on User/Repo Deletion (#19649) 2022-05-08 15:46:34 +02:00
repo Feature: Find files in repo (#15028) 2022-06-09 14:15:08 +03:00
unit Fix incorrect translation key (#19744) 2022-05-19 09:59:28 +08:00
unittest Refactor git module, make Gitea use internal git config (#19732) 2022-06-10 09:57:49 +08:00
user Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
webhook Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
action_list.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
action_test.go GetFeeds must always discard actions with dangling repo_id (#19598) 2022-05-05 11:39:26 -04:00
action.go Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
branches_test.go more context for models (#19511) 2022-04-28 13:48:48 +02:00
branches.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
commit_status_test.go
commit_status.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
commit.go
consistency_test.go [doctor] Add check/fix for bogus action rows (#19656) 2022-05-10 02:49:01 +02:00
consistency.go Fix order by parameter (#19849) 2022-06-04 20:18:50 +01:00
engine_test.go
error.go Delete related PullAutoMerge and ReviewState on User/Repo Deletion (#19649) 2022-05-08 15:46:34 +02:00
fixture_generation.go Move access and repo permission to models/perm/access (#19350) 2022-05-11 12:09:36 +02:00
fixture_test.go
issue_assignees_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_assignees.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_comment_list.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_comment_test.go
issue_comment.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_dependency_test.go Use for a repo action one database transaction (#19576) 2022-05-03 21:46:28 +02:00
issue_dependency.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_label_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_label.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_list_test.go
issue_list.go Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
issue_lock.go Move milestone to models/issues/ (#19278) 2022-04-08 17:11:15 +08:00
issue_project.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_stopwatch_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_stopwatch.go Only return valid stopwatches (#19863) 2022-06-02 10:36:46 +08:00
issue_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_tracked_time_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_tracked_time.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_user_test.go
issue_user.go Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
issue_watch_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_watch.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_xref_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue_xref.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
issue.go Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
lfs_lock.go Move access and repo permission to models/perm/access (#19350) 2022-05-11 12:09:36 +02:00
lfs.go Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
main_test.go Use a struct as test options (#19393) 2022-04-14 21:58:21 +08:00
migrate_test.go Move milestone to models/issues/ (#19278) 2022-04-08 17:11:15 +08:00
migrate.go Move milestone to models/issues/ (#19278) 2022-04-08 17:11:15 +08:00
notification_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
notification.go Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
org_team_test.go Move access and repo permission to models/perm/access (#19350) 2022-05-11 12:09:36 +02:00
org_team.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
org_test.go Move organization related structs into sub package (#18518) 2022-03-29 14:29:02 +08:00
org.go Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
protected_tag_test.go
protected_tag.go Move organization related structs into sub package (#18518) 2022-03-29 14:29:02 +08:00
pull_list.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
pull_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
pull.go Make WIP prefixes case insensitive, e.g. allow Draft as a WIP prefix (#19780) 2022-05-26 10:19:24 +01:00
release.go improvement some release related code (#19867) 2022-06-03 02:13:58 -04:00
repo_activity.go Fix some slice problems (incorrect slice length) (#19592) 2022-05-03 17:04:23 +08:00
repo_collaboration_test.go Move access and repo permission to models/perm/access (#19350) 2022-05-11 12:09:36 +02:00
repo_collaboration.go Fix order by parameter (#19849) 2022-06-04 20:18:50 +01:00
repo_permission_test.go Move access and repo permission to models/perm/access (#19350) 2022-05-11 12:09:36 +02:00
repo_test.go Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
repo_transfer_test.go
repo_transfer.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
repo.go Move some repository related code into sub package (#19711) 2022-06-06 16:01:49 +08:00
review_test.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
review.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
statistic.go Estimate Action Count in Statistics (#19775) 2022-05-21 14:50:50 -04:00
task.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
token_test.go
token.go
upload.go
user_heatmap_test.go
user_heatmap.go Move organization related structs into sub package (#18518) 2022-03-29 14:29:02 +08:00
user_test.go Move organization related structs into sub package (#18518) 2022-03-29 14:29:02 +08:00
user.go Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00