Commit graph

19 commits

Author SHA1 Message Date
Alejandro Rodríguez
0b07be594e Move git operations for multi_action into Gitlab::Git 2018-01-05 15:17:53 -03:00
Rubén Dávila
c927e57466 Updates from last code review:
- Apply some refactoring for code reuse
- Add file status validation for Files::DeleteService
- Write additional specs
2017-12-20 10:57:27 -05:00
Rubén Dávila
c210ddab92 Check if file has been modified for each action provided.
When commiting multiple files we're now checking if any of those files
has been modified by another commit and we're rejecting the new commit
in this case.
2017-12-20 01:24:53 -05:00
Douwe Maan
d170133bde Refactor changing files in web UI 2017-04-20 00:37:44 +00:00
Sean McGivern
811e598f60 Enable and autocorrect the CustomErrorClass cop 2017-03-01 15:28:10 +00:00
Douwe Maan
705f15587b Fix spec 2017-02-24 14:11:10 -06:00
Douwe Maan
38a7a5f4bc Add newline 2017-02-24 11:43:58 -06:00
Douwe Maan
c72e715522 Raise error when no content is provided 2017-02-24 09:55:01 -06:00
Douwe Maan
a530e9da35 Address review 2017-02-24 09:55:01 -06:00
Douwe Maan
0625af3bcb Consistently create, update, and delete files, taking CRLF settings into account 2017-02-24 09:55:01 -06:00
Oswaldo Ferreira
c79bbe26ab Change branch_name param to branch throughout V4 API 2017-02-21 16:33:14 -03:00
Lin Jen-Shin
ccc73c455b Rename from base to start because base could mean merge base 2017-01-06 23:29:13 +08:00
Lin Jen-Shin
a4b97b2cb6 Rename source to base to avoid confusion from MR 2017-01-06 22:05:30 +08:00
Lin Jen-Shin
dc4b3dd0ae Fix source_project and also pass source_project
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747556
2016-12-14 01:47:17 +08:00
Lin Jen-Shin
3fa3fcd787 Cleanup parameters, easier to understand and
more consistent across different methodst
2016-12-08 17:08:25 +08:00
Lin Jen-Shin
12f07300d0 Merge remote-tracking branch 'upstream/master' into 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
  ...
2016-11-24 17:18:17 +08:00
Semyon Pupkov
724864eeb4 Remove unnecessary require_relative calls from service classes
Rails by default use autoload for all dirs from app folder.
require_relative not needed. See ActiveSupport::Dependencies.autoload_paths
2016-11-22 11:25:00 +05:00
Lin Jen-Shin
0b5a2eef8f Add source_branch option for various git operations
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
2016-11-15 04:02:10 +08:00
Marc Siegfriedt
a1ee8cf5ad multi-file commit
add docs and tests - add additional validation
allow move without content
updated response
2016-10-05 17:42:52 +00:00