summaryrefslogtreecommitdiff
path: root/app/services/files
Commit message (Collapse)AuthorAgeFilesLines
* Refactor changing files in web UIDouwe Maan2017-04-206-249/+43
|
* Fix variable name and change copyDouwe Maan2017-03-011-1/+1
|
* Fix creating a file in an empty repo using the APIDouwe Maan2017-03-011-10/+6
|
* Enable and autocorrect the CustomErrorClass copSean McGivern2017-03-013-3/+3
|
* Fix specdm-fix-web-edit-new-linesDouwe Maan2017-02-243-5/+5
|
* Add newlineDouwe Maan2017-02-241-0/+1
|
* Raise error when no content is providedDouwe Maan2017-02-243-7/+23
|
* Address reviewDouwe Maan2017-02-241-6/+6
|
* Rename commit_file, commit_dir and remove_file and update specsDouwe Maan2017-02-243-4/+3
|
* Consistently create, update, and delete files, taking CRLF settings into accountDouwe Maan2017-02-241-3/+11
|
* Change branch_name param to branch throughout V4 API22132-rename-branch-name-params-to-branchOswaldo Ferreira2017-02-211-4/+4
|
* Rename Files::DeleteService to Files::DestroyServicedixpac2017-02-101-1/+1
| | | | | Reason for renaming is to comply with naming convention of services in codebase.
* Rename from base to start because base could mean merge baseLin Jen-Shin2017-01-066-18/+18
|
* Rename source to base to avoid confusion from MRLin Jen-Shin2017-01-066-18/+18
|
* Fix source_project and also pass source_projectLin Jen-Shin2016-12-144-0/+4
| | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747556
* Cleanup parameters, easier to understand andLin Jen-Shin2016-12-085-15/+15
| | | | more consistent across different methodst
* Prefer repository.branch_exists?Lin Jen-Shin2016-12-081-3/+3
|
* Merge remote-tracking branch 'upstream/master' into ↵Lin Jen-Shin2016-11-245-10/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix-git-hooks-when-creating-file * upstream/master: (141 commits) Log mv_namespace parameters Remove header ids from University docs Added test that checks the correct select box is there for the LFS enabled setting. Simplify copy on "Create a new list" dropdown in Issue Boards Fix `LFS enabled` select box. Use Commit#author so we share logic and cache Move admin abuse report spinach test to rspec fixes non-retina shadow and browser zoom issue Use default `closest` if available! Adds polyfill for CustomEvent Move abuse report spinach test to rspec Add support of Chrome/Chromium in requirements.md Fixed dragging issues on issue boards Grapify the sidekiq metrics API Add nested groups support to the routing Correctly determine mergeability of MR with no discussions API: Add endpoint to delete a group share Add a starting date to milestones Update ProjectTeam#fetch_members to use project authorizations Update ProjectTeam#max_member_access_for_user_ids to use project authorizations ...
| * Remove unnecessary require_relative calls from service classesSemyon Pupkov2016-11-225-10/+0
| | | | | | | | | | Rails by default use autoload for all dirs from app folder. require_relative not needed. See ActiveSupport::Dependencies.autoload_paths
* | Move all branch creation to raw_ensure_branch,Lin Jen-Shin2016-11-222-12/+2
| | | | | | | | and keep it only called in update_branch_with_hooks.
* | Add a few comments to explain implementation detailLin Jen-Shin2016-11-151-0/+3
| |
* | Make sure we have the branch on the other projectLin Jen-Shin2016-11-151-1/+9
| |
* | Add `source_branch` option for various git operationsLin Jen-Shin2016-11-156-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | If `source_branch` option is passed, and target branch cannot be found, `Repository#update_branch_with_hooks` would try to create a new branch from `source_branch`. This way, we could make changes in the new branch while only firing the hooks once for the changes. Previously, we can only create a new branch first then make changes to the new branch, firing hooks twice. This behaviour is bad for CI. Fixes #7237
* | Revert "Don't execute git hooks if you create branch as part of other change"Lin Jen-Shin2016-11-151-1/+1
| | | | | | | | This reverts commit a431ca0f8b7f8967e89a35caddf1e41e53eee290.
* | Don't execute git hooks if you create branch as part of other changeKamil Trzcinski2016-11-021-1/+1
|/ | | | | | | | | | | Currently, our procedure for adding a commit requires us to execute `CreateBranchService` before file creation. It's OK, but also we do execute `git hooks` (the `PostReceive` sidekiq job) as part of this process. However, this hook is execute before the file is actually committed, so the ref is updated. Secondly, we do execute a `git hooks` after committing file and updating ref. This results in duplicate `PostReceive` jobs, where the first one is completely invalid. This change makes the branch creation, something that is intermediate step of bigger process (file creation or update, commit cherry pick or revert) to not execute git hooks.
* multi-file commitMarc Siegfriedt2016-10-053-8/+133
| | | | | | add docs and tests - add additional validation allow move without content updated response
* Add optional 'author' param when making commitsDan Dunckel2016-09-195-4/+8
|
* Prevents accidental overwrites of commits from UIFrank West2016-08-152-0/+24
| | | | | | | | | | | | | Currently when a user performs an update of a file through the UI and there has already been a change committed to the file the previous commits will be overwritten without a check to see if the file has been changed. This commit uses the last commit sha at the time the user starts editing the file and compares it with the current sha of the file being edited to ensure they are the same before committing the file. If the shas do not match we throw an exception preventing the commit from the commit from occurring. Fixes #5857
* Merge branch 'master' into rename-repo-filestiagonbotelho2016-07-191-1/+1
|\
| * Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' ""Rémy Coutable2016-07-181-1/+1
| | | | | | | | | | | | | | | | This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50. See !4892. Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Revert "Merge branch '18193-developers-can-merge' into 'master' "Robert Speicher2016-07-131-1/+1
| | | | | | | | | | This reverts commit 9ca633eb4c62231e4ddff5466c723cf8e2bdb25d, reversing changes made to fb229bbf7970ba908962b837b270adf56f14098f.
| * Refactor `Gitlab::GitAccess`Timothy Andrew2016-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Don't use case statements for dispatch anymore. This leads to a lot of duplication, and makes the logic harder to follow. 2. Remove duplicated logic. - For example, the `can_push_to_branch?` exists, but we also have a different way of checking the same condition within `change_access_check`. - This kind of duplication is removed, and the `can_push_to_branch?` method is used in both places. 3. Move checks returning true/false to `UserAccess`. - All public methods in `GitAccess` now return an instance of `GitAccessStatus`. Previously, some methods would return true/false as well, which was confusing. - It makes sense for these kinds of checks to be at the level of a user, so the `UserAccess` class was repurposed for this. The prior `UserAccess.allowed?` classmethod is converted into an instance method. - All external uses of these checks have been migrated to use the `UserAccess` class 4. Move the "change_access_check" into a separate class. - Create the `GitAccess::ChangeAccessCheck` class to run these checks, which are quite substantial. - `ChangeAccessCheck` returns an instance of `GitAccessStatus` as well. 5. Break out the boolean logic in `ChangeAccessCheck` into `if/else` chains - this seems more readable. 6. I can understand that this might look like overkill for !4892, but I think this is a good opportunity to clean it up. - http://martinfowler.com/bliki/OpportunisticRefactoring.html
* | fixes more issues for MR acceptancetiagonbotelho2016-07-121-2/+0
| |
* | refactors to pass values as arguments through optionstiagonbotelho2016-07-121-0/+1
| |
* | remove prints and useless commentstiagonbotelho2016-07-121-2/+0
| |
* | successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-0/+2
| |
* | remove prints and useless commentstiagonbotelho2016-07-121-2/+0
| |
* | successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-0/+2
| |
* | implements the form for renaming the new filename on the file edit pagetiagonbotelho2016-07-121-0/+1
| |
* | remove prints and useless commentstiagonbotelho2016-07-121-2/+0
| |
* | successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-0/+2
| |
* | remove prints and useless commentstiagonbotelho2016-07-121-2/+0
| |
* | successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-0/+2
| |
* | remove prints and useless commentstiagonbotelho2016-07-121-2/+0
| |
* | successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-0/+2
| |
* | remove prints and useless commentstiagonbotelho2016-07-121-2/+0
| |
* | successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-0/+2
| |
* | remove prints and useless commentstiagonbotelho2016-07-121-2/+0
| |
* | successfully adds the new version with the updated name on the projects repotiagonbotelho2016-07-121-0/+2
| |
* | fixes more issues for MR acceptancetiagonbotelho2016-07-121-2/+3
| |