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/cmd
James E. Blair 488d34691a Ignore non-standard refs in git push (#6758)
When replicating to gitea from a remote system which makes use of
git refs to store extra data (for example, gerrit), pushing a lot
of refs to gitea can cause problems due to the extra processing
that the pre and post receive hooks perform.  But it's still
useful for gitea to be able to serve those refs.  This change
skips unecessary processing of refs other than branches or tags.

We don't need to check any ref that isn't a branch for branch
protection (protection will never be enabled).  So in the
pre-receive hook, we wrap that check in a test for whether the
ref is a branch.

We also don't need to add information to the activity stream about
pushes to non-standard refs, so we skip that step in the
post-receive hook for refs which are not branches or tags.

For some concrete examples, gerrit maintains a ref for every
patchset of every change in the form refs/changes/XX/YYYY/Z.
Many systems use refs/notes to store additonal data about commits.
This change allows these and other schemes to be used without
affecting gitea.
5 years ago
..
admin.go Generate access token in admin cli (#6847) 5 years ago
cert.go General refactor of the cmd package (#3328) 7 years ago
cmd.go Disallow empty titles (#5785) 6 years ago
dump.go Change verbose flag in dump command to avoid colliding with global version flag (#6822) 5 years ago
generate.go Rename LFS_JWT_SECRET to include OAUTH2 as well (#6826) 5 years ago
hook.go Ignore non-standard refs in git push (#6758) 5 years ago
keys.go Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631) 5 years ago
migrate.go Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631) 5 years ago
serv.go Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631) 5 years ago
web.go Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631) 5 years ago
web_graceful.go Better logging (#6038) (#6095) 5 years ago
web_windows.go fix windows build broken by #416 8 years ago