Tiago Botelho
cd9daf644e
Add specs
2018-03-01 14:38:35 +00:00
Grzegorz Bizon
eb421c88ee
Merge branch 'fix-squash-with-renamed-files' into 'master'
...
Fix squash with renamed files
Closes gitlab-ee#4975
See merge request gitlab-org/gitlab-ce!17216
2018-02-22 11:35:34 +00:00
Douwe Maan
e503efa320
Merge branch 'zj-branch-contains-git-message' into 'master'
...
Allow branchnames to be named the same as the commit it points to
See merge request gitlab-org/gitlab-ce!17231
2018-02-22 11:34:03 +00:00
Zeger-Jan van de Weg
e70fe78281
Handle branch and tag names which are commit ids
...
Adds a test where a branch name is also a valid commit id. Git, the
binary should create an error message which is difficult to parse and
leading to errors later, as seen in: gitlab-org/gitlab-ce#43222
To catch these cases in the future,
gitlab-test@1942eed5cc108b19c7405106e81fa96125d0be22 was created. Which
a branch name matching the commit
2018-02-21 19:08:26 +01:00
Ken
ed0a029d53
26039 - update github-linguist to 5.3.3 version
...
26039 - add merge request id
26039 change due to lingust source file updates
2018-02-21 03:29:04 +10:30
Sean McGivern
01f5035bfe
Fix squash with renamed files
...
We need to ignore the names for renamed files when configuring with sparse
checkout.
2018-02-19 15:11:10 +00:00
Stan Hu
8d32dfef9b
Fix squash rebase not working when diff contained encoded data
...
When the applied diff contains UTF-8 or some other encoded data, the diff
returned back from the git process may be in ASCII-8BIT format. Writing this
data to stdin may fail if the data because stdin expects this data to be in
UTF-8. By switching the output to binmode, we ensure that the diff will
always be written as-is.
Closes gitlab-org/gitlab-ee#4960
2018-02-18 21:48:49 -08:00
Zeger-Jan van de Weg
73e78c4e15
Don't use rugged in Repository#refs_hash
...
The refs hash is used to determine what branches and tags have a commit
as head in the network graph. The previous implementation depended on
Rugged#references. The problem with this implementation was that it
depended on rugged, but also that it iterated over all references and
thus loading more data than needed if for example the project uses CI/CD
environments, Pipelines, or Merge Requests.
Given only refs are checked the network cares about the GraphHelper#refs
method has no need to reject those, simplifying the method.
Closes gitlab-org/gitaly#880
2018-02-07 15:07:03 +01:00
Rémy Coutable
f5990e444a
Merge branch 'gitaly-user-squash' into 'master'
...
Incorporate OperationService.UserSquash Gitaly RPC
Closes gitaly#991
See merge request gitlab-org/gitlab-ce!16899
2018-02-05 10:32:20 +00:00
Grzegorz Bizon
5aea8dc1a6
Merge branch 'fix/remove-duplicated-logic-between-model-and-lib-in-find-branch' into 'master'
...
Remove repo reloading logic from Repository#find_branch
Closes #42609
See merge request gitlab-org/gitlab-ce!16815
2018-02-03 21:47:28 +00:00
Alejandro Rodríguez
e60bf2f256
Incorporate OperationService.UserSquash Gitaly RPC
2018-02-02 19:02:40 -03:00
Ahmad Sherif
05f17e4d72
Remove repo reloading logic from Repository#find_branch
...
Gitlab::Git::Repository#find_branch has a similar logic.
Fixes #42609
2018-02-02 22:24:54 +01:00
Alejandro Rodríguez
658749ddd3
Fix an issue where sparse checkout wasn't configured correctly
...
This was affecting the performance of `Gitlab::Git::Repository#squash`.
2018-02-01 17:07:40 -03:00
Robert Speicher
2793e3e1cc
Merge branch 'gitaly-970-repo-write-config' into 'master'
...
Migrate Gitlab::Git::Repository#write_config to Gitaly
Closes gitaly#970
See merge request gitlab-org/gitlab-ce!16730
2018-02-01 19:46:32 +00:00
Rémy Coutable
76b9f1a4c5
Merge branch '42497-rubocop-style-regexpliteral' into 'master'
...
Enable Style/RegexpLiteral cop
Closes #42497
See merge request gitlab-org/gitlab-ce!16752
2018-02-01 09:11:09 +00:00
Takuya Noguchi
2b6307f6ad
Enable RuboCop Style/RegexpLiteral
2018-02-01 02:06:07 +09:00
Kim "BKC" Carlbäcker
28bbb4cb47
Migrate Gitlab::Git::Repository#write_config to Gitaly
...
- Add tests for Repository#write_config
2018-01-31 15:02:31 +01:00
Jacob Vosmaer
afe665d9c0
Remove Rugged::Walk implementation of #log
2018-01-31 11:56:36 +01:00
Ahmad Sherif
1ebb781f6a
Migrate Git::Repository#delete_refs to Gitaly
...
Closes gitaly#967
2018-01-30 23:48:51 +01:00
Jacob Vosmaer (GitLab)
5c2fe2d3d7
Decouple more of Repository from Rugged
2018-01-30 16:21:55 +00:00
Jacob Vosmaer (GitLab)
e407c2d18f
Don't allow Repository#log with limit zero
2018-01-29 15:27:46 +00:00
Ahmad Sherif
2290b438f4
Fix rubocop offenses introduced in !16623
2018-01-25 20:44:16 +01:00
Robert Speicher
af95ba2fb4
Merge branch 'feature/migrate-repo-restorer-to-gitaly' into 'master'
...
Migrate restoring repo from bundle to Gitaly
Closes gitaly#946
See merge request gitlab-org/gitlab-ce!16623
2018-01-25 19:03:51 +00:00
Jacob Vosmaer (GitLab)
7363aa0b9d
Revert "Merge branch 'remove-rugged-walk' into 'master'"
...
This reverts merge request !16525
2018-01-25 11:03:29 +01:00
Ahmad Sherif
6a28967c14
Migrate restoring repo from bundle to Gitaly
...
Closes gitaly#946
2018-01-24 19:02:32 +01:00
Ahmad Sherif
24625323a8
Migrate repository bundling to Gitaly
...
Closes gitaly#929
2018-01-24 12:10:31 +01:00
Jacob Vosmaer (GitLab)
fa52038731
Remove Rugged::Walker from Repository#log
2018-01-18 14:05:14 +00:00
Jacob Vosmaer (GitLab)
f4de7309ab
Remove unused methods from Gitlab::Git
2018-01-17 09:54:27 +00:00
Ahmad Sherif
831019412f
Migrate merged_branch_names to Gitaly
...
Closes gitaly#851
2018-01-11 14:52:15 +01:00
Sean McGivern
d42c0ecc02
Merge branch 'gitaly-fetch-internal-remote' into 'master'
...
Incorporate RemoteService.FetchInternalRemote Gitaly RPC
Closes gitaly#857
See merge request gitlab-org/gitlab-ce!16140
2018-01-08 10:42:35 +00:00
Alejandro Rodríguez
9ff44c2986
Incorporate RemoteService.FetchInternalRemote Gitaly RPC
2018-01-05 15:45:24 -03:00
Lin Jen-Shin (godfat)
33c5630b02
Use --left-right and --max-count for counting diverging commits
2018-01-05 16:52:06 +00:00
Dmitriy Zaporozhets
58a705aaac
Merge branch 'ce-gitaly-remote-mirror-prep' into 'master'
...
[CE] Move git operations for UpdateRemoteMirrorService into Gitlab::Git
See merge request gitlab-org/gitlab-ce!16023
2018-01-04 16:02:22 +00:00
Sean McGivern
a0ae886135
Merge branch 'gitaly-merge-nil' into 'master'
...
Handle Gitaly aborted merge due to branch update
Closes gitaly#854
See merge request gitlab-org/gitlab-ce!16116
2018-01-04 11:01:02 +00:00
Alejandro Rodríguez
1c458d17d7
Move delete_remote_branches from Gitlab::Shell to Gitlab::Git::Repository
2018-01-03 23:07:38 -03:00
Alejandro Rodríguez
43308bd826
Move push_remote_branches from Gitlab::Shell to Gitlab::Git::Repository
2018-01-03 23:06:34 -03:00
Jacob Vosmaer
449b59ec69
Better English
2018-01-03 12:54:47 +01:00
Jacob Vosmaer
8cf0ea4469
Handle Gitaly aborted merge due to branch update
2018-01-03 12:02:37 +01:00
Ahmad Sherif
13932b0b12
Add support for max_count option to Git::Repository#count_commits
2017-12-27 14:16:24 +01:00
Dmitriy Zaporozhets
87bae6d42f
Merge branch 'gitaly-remotes' into 'master'
...
Incorporate Gitaly's RemoteService RPCs
Closes gitaly#852
See merge request gitlab-org/gitlab-ce!16060
2017-12-25 10:43:04 +00:00
Alejandro Rodríguez
2694355bb6
Incorporate Gitaly's RemoteService RPCs
2017-12-22 20:30:08 -03:00
Alejandro Rodríguez
7354c9f75d
Remove unused method `remote_exists?`
2017-12-22 20:30:07 -03:00
blackst0ne
27c95364b5
Replace '.team << [user, role]' with 'add_role(user)' in specs
2017-12-22 19:18:28 +11:00
Nick Thomas
4b785df27b
Import gitlab_projects.rb from gitlab-shell
...
By importing this Ruby code into gitlab-rails (and gitaly-ruby), we avoid
200ms of startup time for each gitlab_projects subprocess we are eliminating.
By not having a gitlab_projects subprocess between gitlab-rails / sidekiq and
any git subprocesses (e.g. for fork_project, fetch_remote, etc, calls), we can
also manage these git processes more cleanly, and avoid sending SIGKILL to them
2017-12-14 16:00:04 +00:00
Robert Speicher
6930fa3102
Merge branch 'gitaly-mirroring-prep' into 'master'
...
Gitaly mirroring migration prep
Closes gitaly#816
See merge request gitlab-org/gitlab-ce!15775
2017-12-11 20:50:07 +00:00
Zeger-Jan van de Weg
03ac8d5d0b
Remove Rugged::Repository#empty?
2017-12-07 15:33:30 +00:00
Alejandro Rodríguez
885a4da208
Add feature flag to use gitaly-ssh mirroring when cloning internal repos
...
This also allows us to simplify the naming since we can make some
fetching methods private.
2017-12-06 18:41:45 -03:00
Stan Hu
66127221fe
Gracefully handle case when repository's root ref does not exist
...
This was failing regularly with an Error 500 when the API branches endpoint
was used.
Closes #40615
2017-11-30 23:21:44 -08:00
Sean McGivern
dd11f0e053
Merge branch 'dm-cleanup-fetch-and-mirror-methods' into 'master'
...
Clean up repository fetch and mirror methods
See merge request gitlab-org/gitlab-ce!15424
2017-11-23 17:01:47 +00:00
Douwe Maan
0e6beaf50c
Clean up repository fetch and mirror methods
2017-11-23 16:59:50 +01:00