diff options
author | zeripath <art27@cantab.net> | 2019-10-28 18:31:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-28 18:31:55 +0000 |
commit | 5e6a008fba9a85c9a5319d93c1e52e183211a342 (patch) | |
tree | 1da9197537ea37a338838b52e479697f44a046ea /modules/repofiles/update.go | |
parent | af8957bc4ce78613fe03cb1abc6c961dd67ff344 (diff) | |
download | gitea-5e6a008fba9a85c9a5319d93c1e52e183211a342.tar.gz gitea-5e6a008fba9a85c9a5319d93c1e52e183211a342.zip |
Add basic repository lfs management (#7199)
This PR adds basic repository LFS management UI including the ability to find all possible pointers within the repository. Locks are not managed at present but would be addable through some simple additions.
* Add basic repository lfs management
* add auto-associate function
* Add functionality to find commits with this lfs file
* Add link to find commits on the lfs file view
* Adjust commit view to state the likely branch causing the commit
* Only read Oid from database
Diffstat (limited to 'modules/repofiles/update.go')
-rw-r--r-- | modules/repofiles/update.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/repofiles/update.go b/modules/repofiles/update.go index 8a1e51730b..8e057700ab 100644 --- a/modules/repofiles/update.go +++ b/modules/repofiles/update.go @@ -385,7 +385,7 @@ func CreateOrUpdateRepoFile(repo *models.Repository, doer *models.User, opts *Up contentStore := &lfs.ContentStore{BasePath: setting.LFS.ContentPath} if !contentStore.Exists(lfsMetaObject) { if err := contentStore.Put(lfsMetaObject, strings.NewReader(opts.Content)); err != nil { - if err2 := repo.RemoveLFSMetaObjectByOid(lfsMetaObject.Oid); err2 != nil { + if _, err2 := repo.RemoveLFSMetaObjectByOid(lfsMetaObject.Oid); err2 != nil { return nil, fmt.Errorf("Error whilst removing failed inserted LFS object %s: %v (Prev Error: %v)", lfsMetaObject.Oid, err2, err) } return nil, err |