Commit graph

4 commits

Author SHA1 Message Date
6543
3e88af898a
Make git.OpenRepository accept Context ()
* OpenRepositoryCtx -> OpenRepository
* OpenRepository -> openRepositoryWithDefaultContext, only for internal usage
2022-03-30 03:13:41 +08:00
zeripath
5cb0c9aa0d
Propagate context and ensure git commands run in request context ()
This PR continues the work in  by progressively ensuring that git
commands run within the request context.

This now means that the if there is a git repo already open in the context it will be used instead of reopening it.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-01-19 23:26:57 +00:00
Lunny Xiao
719bddcd76
Move repository model into models/repo ()
* Some refactors related repository model

* Move more methods out of repository

* Move repository into models/repo

* Fix test

* Fix test

* some improvements

* Remove unnecessary function
2021-12-10 09:27:50 +08:00
zeripath
8de44d1995
Clean-up HookPreReceive and restore functionality for pushing non-standard refs ()
* Clean-up HookPreReceive and restore functionality for pushing non-standard refs

There was an inadvertent breaking change in  meaning that notes refs and other
git extension refs will be automatically rejected.

Further following  and  the pre-recieve hook code is untenably long and
too complex.

This PR refactors the hook code and removes the incorrect forced rejection of
non-standard refs.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-09-16 15:34:54 +02:00