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
..
2022-02-16 21:03:58 +00:00
2022-06-10 09:57:49 +08:00
2022-05-07 20:28:10 +02:00
2022-06-04 17:43:25 -04:00
2021-03-14 19:52:12 +01:00
2022-01-26 12:10:10 +08:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2022-03-30 03:13:41 +08:00
2022-01-26 12:10:10 +08:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-11-09 20:57:58 +01:00
2021-03-14 19:52:12 +01:00
2021-09-22 13:38:34 +08:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2022-04-01 10:55:30 +08:00
2021-03-14 19:52:12 +01:00
2021-07-24 18:03:58 +02:00
2022-04-01 10:55:30 +08:00
2022-01-19 23:26:57 +00:00
2021-01-28 23:58:33 +01:00
2021-11-17 20:34:35 +08:00
2021-11-17 20:34:35 +08:00
2021-03-14 19:52:12 +01:00
2021-07-08 13:38:13 +02:00
2022-06-04 20:18:50 +01:00
2022-03-30 03:13:41 +08:00
2021-03-14 19:52:12 +01:00
2021-03-14 19:52:12 +01:00
2020-11-10 22:37:11 +00:00
2020-11-28 21:30:46 +02:00
2021-11-05 00:47:01 +02:00
2021-07-23 12:41:27 +08:00
2020-12-26 23:28:47 +00:00
2021-01-02 00:33:27 +08:00
2022-06-04 20:18:50 +01:00
2021-02-20 15:02:39 +01:00
2021-01-24 16:23:05 +01:00
2021-01-29 23:52:13 +08:00
2021-02-08 11:09:14 +08:00
2021-02-11 18:32:25 +01:00
2021-02-12 13:01:26 +02:00
2021-04-13 20:04:17 -04:00
2021-02-19 12:52:11 +02:00
2021-03-19 21:01:24 +02:00
2021-11-17 20:34:35 +08:00
2022-01-20 18:46:10 +01:00
2021-03-24 19:27:22 +01:00
2022-01-20 18:46:10 +01:00
2021-03-24 19:27:22 +01:00
2021-04-08 18:25:57 -04:00
2022-06-04 20:18:50 +01:00
2022-03-31 10:25:40 +08:00
2022-01-20 18:46:10 +01:00
2021-06-23 17:12:38 -04:00
2022-01-20 18:46:10 +01:00
2021-08-25 09:42:51 +01:00
2021-06-14 19:20:43 +02:00
2021-12-02 21:17:24 +08:00
2021-06-23 17:12:38 -04:00
2021-06-25 16:28:55 +02:00
2021-06-27 20:21:09 +01:00
2021-07-13 15:28:07 +02:00
2022-01-20 18:46:10 +01:00
2021-07-24 18:03:58 +02:00
2021-07-28 17:42:56 +08:00
2022-01-20 18:46:10 +01:00
2021-08-25 09:42:51 +01:00
2021-09-08 17:19:30 +02:00
2021-09-08 17:19:30 +02:00
2021-09-11 16:21:17 +02:00
2022-01-20 18:46:10 +01:00
2021-09-23 18:50:06 +08:00
2021-09-29 22:53:12 +02:00
2021-10-08 19:03:04 +02:00
2021-10-10 18:40:03 -04:00
2021-10-21 17:10:49 +01:00
2021-10-21 17:22:43 +08:00
2021-10-21 17:10:49 +01:00
2021-12-19 00:37:18 -05:00
2021-12-08 14:57:18 +08:00
2021-12-20 18:58:38 +01:00
2022-06-04 20:18:50 +01:00
2022-01-05 11:37:00 +08:00
2022-02-16 21:03:58 +00:00
2022-02-16 21:03:58 +00:00
2022-02-16 21:03:58 +00:00
2022-02-23 20:16:07 +00:00
2022-03-10 23:04:55 +01:00
2022-03-17 18:08:35 +01:00
2022-03-30 16:42:47 +08:00
2022-04-28 17:45:33 +02:00
2022-05-08 01:05:52 +08:00
2022-05-08 15:46:34 +02:00