Lin Jen-Shin
944a8fa4d2
Use branch_exists? to check branches
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747922
2016-12-14 03:00:16 +08:00
Lin Jen-Shin
d03c605bd4
Unify parameters and callback after hooks
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747856
2016-12-14 02:29:35 +08:00
Lin Jen-Shin
46d752ce21
Use a regular class for GitOperationService
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19747793
2016-12-14 02:03:04 +08:00
Lin Jen-Shin
bb9d30590d
Pass source_commit so that we save a few lookups
2016-12-10 00:40:23 +08:00
Lin Jen-Shin
8384d0d8d5
Introduce Repository#with_tmp_ref which we need
...
commits from the other repository. We'll cleanup
the tmp ref after we're done with our business.
2016-12-08 17:57:52 +08:00
Lin Jen-Shin
23032467d4
source_branch -> source_branch_name
2016-12-08 17:27:50 +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
5ecd0c81af
Commit outside the hooks if possible:
...
So we still commit outside the hooks, and only
update ref inside the hooks. There are only two
exceptions:
* Whenever it's adding a tag. We can't add a tag
without committing, unfortunately. See !7700
* Whenever source project is in another repository.
We'll need to fetch ref otherwise commits can't be made.
See the whole discussion starting from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19210942
2016-12-07 22:37:43 +08:00
Lin Jen-Shin
6ae1a73cfd
Pass source_branch properly for cherry-pick/revert
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237/diffs#note_19210818
2016-12-07 19:50:08 +08:00
Lin Jen-Shin
65806ec632
Re-enable tests for update_branch_with_hooks and
...
Add back check if we're losing commits in a merge.
2016-12-06 18:47:24 +08:00
Lin Jen-Shin
a52dc7cec7
Introduce GitOperationService and wrap every
...
git operation inside GitHooksService. Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_19210942
TODO: Fix tests for update_branch_with_hooks
2016-12-06 03:13:15 +08:00