Commit graph

17 commits

Author SHA1 Message Date
Sean McGivern
3c6a4d6363 Ensure MRs always use branch refs for comparison
If a merge request was created with a branch name that also matched a tag name,
we'd generate a comparison to or from the tag respectively, rather than the
branch. Merging would still use the branch, of course.

To avoid this, ensure that when we get the branch heads, we prepend the
reference prefix for branches, which will ensure that we generate the correct
comparison.
2017-11-28 17:01:38 +00:00
Felipe Artur
b54203f0ad Commenting on image diffs 2017-10-07 04:25:17 +00:00
Jacob Vosmaer
902b5347dc Prepare Repository#merge for migration to Gitaly 2017-09-15 16:39:20 +02:00
Rémy Coutable
ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Douwe Maan
ab91f76e8b Add system note with link to diff comparison when MR discussion becomes outdated 2017-05-23 16:27:30 -05:00
Rémy Coutable
d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Douwe Maan
63d38a303b Fix commenting on an existing discussion on an unchanged line that is no longer in the diff 2017-04-24 11:17:15 -05:00
Douwe Maan
d170133bde Refactor changing files in web UI 2017-04-20 00:37:44 +00:00
dixpac
fa2339641f Rename Files::DeleteService to Files::DestroyService
Reason for renaming is to comply with naming convention of services in
codebase.
2017-02-10 18:22:18 +01:00
Sean McGivern
7550f60dde Backport changes from EE squash
Backport changes from the EE-only squash implementation, which would
otherwise conflict when merge CE into EE.

<https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1024>
2017-02-03 09:46:03 +00:00
Lin Jen-Shin
406dfd6e0f Merge remote-tracking branch 'upstream/master' into fix-git-hooks-when-creating-file
* upstream/master:
  Ensure we have a project with a repo in GitlabMarkdownHelper specs
  Revert "Make sure TraceReader uses Encoding.default_external"
  Make sure TraceReader uses Encoding.default_external
  Update CONTRIBUTING.md after merging "up-for-grabs" and "Accepting Merge Requests" [ci skip]
  Use `:empty_project` where possible in finder specs
  Use `empty_project` where possible in controller specs
  Use `:empty_project` where possible in helper specs
  Don’t count tasks that are not defined as list items correctly
  Use a project factory with a repository where necessary
  Use `:empty_project` where possible throughout spec/lib
  Use hashrocket for dasherized attribute
  Remove markdown file extension and add anchor to link
  Fixed builds info link on project settings page
  Factories with a project association use `:empty_project` by default
  Update enviroments.md the example for deleting an environment is missing the "s" in environments. curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/environments/1"  wil 404
2017-01-26 22:19:50 +08:00
Robert Speicher
80a6d2fda2 Use :empty_project where possible throughout spec/lib 2017-01-25 12:25:42 -05:00
Lin Jen-Shin
a639454032 Fix renaming 2017-01-07 00:31:11 +08:00
Rémy Coutable
2cf7f09b1e
Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' ""
This reverts commit 530f5158e2.

See !4892.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-18 10:16:56 +02:00
Robert Speicher
530f5158e2 Revert "Merge branch '18193-developers-can-merge' into 'master' "
This reverts commit 9ca633eb4c, reversing
changes made to fb229bbf79.
2016-07-13 13:57:30 -05:00
Timothy Andrew
495db09653 Enforce "developers can merge" during pre-receive.
1. When a merge request is being merged, save the merge commit SHA in
   the `in_progress_merge_commit_sha` database column.

2. The `pre-receive` hook looks for any locked (in progress) merge
   request with `in_progress_merge_commit_sha` matching the `newrev` it
   is passed.

3. If it finds a matching MR, the merge is legitimate.

4. Update `git_access_spec` to test the behaviour we added here. Also
   refactored this spec a bit to make it easier to add more contexts / conditions.
2016-07-13 13:24:56 +05:30
Douwe Maan
ebb5f591e3 Add tests for PositionTracer 2016-07-06 18:51:00 -04:00