Commit graph

39 commits

Author SHA1 Message Date
Michael Kuhn
0222623be9 Explicitly disable Git credential helper (#5367)
* Explicitly disable Git credential helper

If the user running Gitea has configured a credential helper, Git
credentials might leak out of Gitea.

There are two problems with credential helpers when combined with Gitea:

1. Credentials entered by a user when doing a migration or setting up a
   mirror will end up in the credential store. In the worst case, this
   is the plain text file ~/.git-credentials.
2. Credentials in the credential store will be used for migrations and
   mirrors by all users. For example, if user A sets up a mirror, their
   credentials will be stored. If user B later sets up a mirror from the
   same host and does not enter any credentials, user A's credentials
   will be used.

This PR prepends -c credential.helper= to all Git commands to clear the
list of helpers. This requires at least Git version 2.9, as previous
versions will try to load an empty helper instead. For more details, see
24321375cd

* Update git module
2018-11-28 09:00:25 +02:00
Lauris BH
08bf443016 Implement git refs API for listing references (branches, tags and other) (#5354)
* Inital routes to git refs api

* Git refs API implementation

* Update swagger

* Fix copyright

* Make swagger happy add basic test

* Fix test

* Fix test again :)
2018-11-27 16:52:20 -05:00
Peter Hoffmann
e08c7e521b Add raw blob endpoint to get objects by SHA ID (#5334)
* Add raw blob endpoint

This should make it possible to download raw blobs directly from
/:repo/:username/raw/blob/:sha1 URLs.

* fix: Make it work

* As an SHA-ID is no path getRefNameFromPath can't be used to verify
file specifying parameter
* added relevant change in go-gitea/git #132

Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de>

* Update Gopkg.lock

Can't update all vendors due to errors

Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de>

* style: Add Gitea copyright header

* feat: Added integration test for /repo/u/r/raw/blob

* fix: correct year in copyright header
2018-11-18 13:45:40 -05:00
Lauris BH
fa4663e61e Add push webhook support for mirrored repositories (#4127) 2018-09-06 22:06:09 -04:00
David Schneiderbauer
0be2b34cec update git vendor (#4059) 2018-05-27 21:47:34 +03:00
Antoine GIRARD
3f3383dc0a Migrate to dep (#3972)
* Update makefile to use dep

* Migrate to dep

* Fix some deps

* Try to find a better version for golang.org/x/net

* Try to find a better version for golang.org/x/oauth2
2018-05-21 15:34:20 +03:00
Tris Forster
85d14cc229 Symlink icons (#1416) (#3826)
* Updated vendor code for code.gitea.io/git

* Display symlinks correctly for files and directories

* Added symlink tests

* Applied silverwinds stylesheet patch

Signed-off-by: Tris Forster <tris.git@shoddynet.org>
2018-05-01 10:04:36 +03:00
Ethan Koenig
6eaeb01ecf Update code.gitea.io/git (#3482) 2018-02-10 20:19:26 +02:00
Lauris BH
ca306985d3
Change how merged PR commit info are prepared (#3368)
* Change how merged PR commits and diff are made

* Update code.gitea.io/git dependency

* Fix typo

* Remove unneeded local variable
2018-01-19 08:18:51 +02:00
Sandro Santilli
44053532bb Serve .patch for pull requests (#3305)
* Serve .patch for pull requests

Closes #3259
Updates "git" module, for GetFormatPatch

* Handle io.Copy error
2018-01-07 15:10:20 +02:00
Ethan Koenig
156aa42ba0 Update code.gitea.io/git (#3251) 2017-12-22 09:00:30 +02:00
Bo-Yi Wu
456648adac chore: upgrade gitea/git version (#3240)
ref: https://github.com/go-gitea/gitea/pull/3190
2017-12-19 21:41:29 -06:00
Ethan Koenig
58a7de2aea Update code.gitea.io/git (#3137) 2017-12-11 10:23:34 +08:00
Duncan Ogilvie
551f3cbe42 Memory usage improvements (#3013)
* govendor update code.gitea.io/git

Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>

* Greatly improve memory usage

Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
2017-11-29 09:50:39 +08:00
Lauris BH
9ba7898911 Update vendor git (#2765) 2017-10-23 16:36:14 +03:00
Lauris BH
23645fe05f Sort repository tree entries in natural way (#2506)
* Sort repository tree entries in natural way

* Fix sort for different length strings with first parts equal

* Improve test case

* Refactor return statements

* Update gitea/git dependency
2017-09-19 11:37:03 +03:00
Lauris BH
a4ca54425f update code.gitea.io/git in vendor to fix #2245 (#2250) 2017-08-03 21:48:36 +08:00
Lauris BH
7d61834dc9 Update code.gitea.io/git dependency (#2149) 2017-07-12 22:35:21 -05:00
Bo-Yi Wu
678fec3f6a upgrade git source code. (#2094)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-01 23:05:01 +08:00
Jonas Östanbäck
1f4d84b7b2 Update git module (#2074) 2017-06-28 22:43:58 +08:00
Lauris BH
c259c436d7 update git module (#2037) 2017-06-23 08:06:43 +08:00
Ethan Koenig
75f166b6b9 Update code.gitea.io/git (#2014) 2017-06-20 13:05:32 +08:00
Ethan Koenig
6e452c4da7 Update code.gitea.io/git (#1998) 2017-06-18 08:30:23 +08:00
Antoine GIRARD
0cf89a83c1
Update code.gitea.io/git 2017-06-06 19:36:48 +02:00
Ethan Koenig
abb19eff39 Update code.gitea.io/git (#1849) 2017-06-01 09:43:11 +08:00
Ethan Koenig
474d636794 Update code.gitea.io/git (#1824)
* Update code.gitea.io/git

* Update function calls

* govendor fetch
2017-05-30 04:32:01 -05:00
Bo-Yi Wu
75f1afd1fd fix: tag contain character ) will http 500 on release page (#1670) 2017-05-04 23:38:34 +08:00
Lunny Xiao
91d64656a4 update git which fixes #1133 (#1614) 2017-04-28 16:20:58 +02:00
Mura Li
edbb9eefd6 Fix race when running commands with timeout (#1465)
Update vendored module code.gitea.io/git
2017-04-07 19:23:39 -07:00
Antoine GIRARD
14fe9010ae GPG commit validation (#1150)
* GPG commit validation

* Add translation

+ some little fix

* Move hash calc after retrieving of potential key + missing translation

* Add some little test
2017-03-22 18:43:54 +08:00
Lunny Xiao
0e6b9ea786 Take back control of hooks (#1006)
* git: delegate all server-side Git hooks (#1623)

* create hooks directories

* take control hooks back

* fix lint

* bug fixed and minor changes

* fix imports style

* fix migration scripts
2017-02-23 11:40:44 +08:00
Zsombor
e388db311b Add checkbox to search for all the branches by commit message (#813)
and updating the vendor directory
2017-02-05 22:43:28 +08:00
Lunny Xiao
7209917fd7 bug fix release 2017-01-09 21:54:03 +01:00
Lunny Xiao
61306fa737 Make releases faster than before and resolved #490 (#588)
* make releases faster than before and resolved #490

* fix comment
2017-01-06 09:51:15 +08:00
Sl@ny
c22f9114c7 Implementation of Folder Jumping 2016-12-28 18:09:52 +01:00
Lunny Xiao
47a7529d96 update code.gitea.io/git (#450) 2016-12-22 10:30:52 +01:00
Thibault Meyer
871c964ef7 Upgrade vendor "git" (#175) 2016-11-15 23:24:08 +08:00
Thibault Meyer
54e6ed3431 Upgrade vendor "git" (#161) 2016-11-12 12:09:25 +01:00
Sandro Santilli
4247304f5a Update import paths from github.com/go-gitea to code.gitea.io (#135)
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
2016-11-10 17:24:48 +01:00