Alejandro Rodríguez
79719cf003
Add OperationService.UserDeleteBranch Gitaly RPC
2017-10-03 21:06:34 -03:00
Jacob Vosmaer (GitLab)
403712f06e
Make Repository#has_visible_content more efficient
2017-09-29 13:08:44 +00:00
Sean McGivern
b63e8d64c1
Handle error when fetching ref for MR with deleted source branch
...
If the ref doesn't exist, and the source branch is deleted, we can't get it back
easily. Previously, we ignored this error by shelling out, so replicate that
behaviour.
2017-09-28 11:11:10 +01:00
Alejandro Rodríguez
34eeac6108
Use Gitlab::Git's Popen on that module's code
...
This allows the current Gitaly migration to depend on less code outside
of the Gitlab::Git module
2017-09-20 13:21:54 +02:00
Ahmad Sherif
41ef94e777
Migrate creating/deleting a branch to Gitaly
2017-09-06 17:25:17 +02:00
Ahmad Sherif
e10437de40
Migrate Gitlab::Git::Repository#find_branch to Gitaly
2017-09-05 17:29:45 +00:00
Lin Jen-Shin
c5553ce772
Use `git update-ref --stdin -z` to delete refs
2017-08-30 22:01:23 +08:00
Robert Speicher
51ceacb1fc
Add missing third argument to `Git::Repository#initialize` in spec
2017-08-24 17:34:05 -04:00
Sean McGivern
e46a3d2fda
Merge branch 'git-operation-user' into 'master'
...
Move GitHooksService into Gitlab::Git
See merge request !13739
2017-08-24 14:32:17 +00:00
Andrew Newdigate
fb49c94e49
Delegate Repository::branch_exists? and ref_exists? to Gitlab::Git
2017-08-24 09:20:04 +00:00
Stan Hu
37904108b9
Fix inconsistent number of branches when remote branches are present
...
Users of project mirrors would see that the number of branches did not
match the number in the branch dropdown because remote branches were
counted when Rugged was in use. With Gitaly, only local branches
are counted.
Closes #36934
2017-08-23 22:07:32 -07:00
Jacob Vosmaer
65f83941c3
Make gl_repository a G::G::Repository attribute
2017-08-23 10:45:20 +02:00
Jacob Vosmaer
faaed0aa1f
Delete unused Gitlab::Git methods
2017-08-18 14:12:17 +02:00
Andrew Newdigate
aaa887feba
Client Implementation: RefService::RefExists
2017-08-18 09:43:58 +01:00
Douwe Maan
0da644072f
Merge branch 'malformed-submodule' into 'master'
...
Handle missing .gitmodules when getting submodule urls
See merge request !13509
2017-08-15 09:00:44 +00:00
Douwe Maan
a64760d6d0
Merge branch 'gitaly-404-commit-list-files' into 'master'
...
Migrate `Git::Repository.ls_files` to Gitaly
Closes gitaly#404
See merge request !13302
2017-08-14 15:44:36 +00:00
Jacob Vosmaer
d9b6fd4fba
Handle missing .gitmodules when getting submodule urls
2017-08-14 10:53:02 +02:00
Robert Speicher
c8b802471b
Enable the RSpec/HookArgument cop and auto-correct offenses
2017-08-10 19:29:42 -04:00
Kim "BKC" Carlbäcker
7b10885046
Migrate Git::Repository.ls_files to Gitaly
2017-08-10 16:10:47 +02:00
Rémy Coutable
c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Alejandro Rodríguez
e363fbf71a
Move `deltas` and `diff_from_parents` logic to Gitlab::Git::Commit
...
This helps keep the abstraction layers simpler, and also keep the
interface of those methods consistent, in case of implementation
changes.
2017-08-07 23:33:40 -04:00
Alejandro Rodríguez
c21ae07e33
Refactor Gitlab::Git::Commit to include a repository
2017-08-07 22:34:34 -04:00
Douwe Maan
727b6d16e5
Merge branch 'master' into 'bvl-nfs-circuitbreaker'
...
# Conflicts:
# app/models/repository.rb
# spec/models/repository_spec.rb
2017-08-07 09:13:10 +00:00
Sean McGivern
9b21668663
Merge branch 'gitaly-renames-annotations' into 'master'
...
Gitaly deletions and annotations
See merge request !13280
2017-08-07 08:40:53 +00:00
Bob Van Landuyt
3598e60bf2
Add a Circuitbreaker for storage paths
2017-08-04 15:38:48 +02:00
Jacob Vosmaer
3a8f4a3460
Remove unnecessary 'raw' alias
2017-08-03 15:52:14 +02:00
Jacob Vosmaer
29a07fd3a1
Rename 'commits_between' to 'rugged_commits_between'
2017-08-03 15:48:10 +02:00
Ahmad Sherif
215e0911e5
Migrate Gitlab::Git::Repository#count_commits to Gitaly
...
Closes gitaly#415
2017-08-02 00:33:04 +02:00
Jacob Vosmaer
67de82cf5f
Add option to use CommitLanguages RPC
2017-08-01 10:48:46 +02:00
Alejandro Rodríguez
8e3f2ecfa9
Incorporate RefsService.FindAllBranches Gitaly RPC
2017-07-27 15:40:54 -04:00
Alejandro Rodríguez
8065adcc1e
Improve Gitlab::Git::Repository specs for #branches
2017-07-27 15:39:31 -04:00
Alejandro Rodríguez
432bb22308
Remove unused Gitlab::Git operations
2017-07-27 15:39:31 -04:00
Andrew Newdigate
a89f18bf2c
Renamed Gitaly services
2017-07-18 07:59:36 +00:00
Sean McGivern
8b31ecd3d9
Merge branch 'remove-git-search-files' into 'master'
...
Remove Repository#search_files
See merge request !12879
2017-07-17 11:13:49 +00:00
Jacob Vosmaer
682b328787
Remove Repository#search_files
2017-07-14 18:17:31 +02:00
Jacob Vosmaer
08b462b9b0
Remove deprecated #heads method
2017-07-14 15:11:42 +02:00
Jacob Vosmaer
b2ecf0aa35
Change Git::Repository#log to return Commits
2017-07-13 14:54:21 +02:00
Robert Speicher
1dab640357
Merge branch 'feature/migrate-commit-count-to-gitaly' into 'master'
...
Migrate Gitlab::Git::Repository#commit_count to Gitaly
Closes gitaly#355
See merge request !12688
2017-07-07 15:21:05 +00:00
Ahmad Sherif
c393d88df3
Migrate Gitlab::Git::Repository#commit_count to Gitaly
...
Closes gitaly#355
2017-07-07 13:47:34 +02:00
Sean McGivern
9e4aef263a
Merge branch 'gitaly-submodule-url-for' into 'master'
...
Migrate #submodule_url_for to Gitaly
See merge request !12629
2017-07-05 11:25:39 +00:00
Jacob Vosmaer
b67d1d64cc
Migrate #submodule_url_for to Gitaly
2017-07-05 11:09:03 +02:00
Jacob Vosmaer
ec35a9e860
Remove unnecessary clear_stubs calls
2017-07-04 13:02:11 +02:00
Jacob Vosmaer
8a62f304ef
Add a UTF-8 encoding matcher
2017-06-30 14:32:42 +02:00
Jacob Vosmaer
7648f11381
Remove unnecessary contexts
2017-06-30 14:32:42 +02:00
Jacob Vosmaer
d3bcf8ac2a
Fix gitaly ref encoding bugs
2017-06-28 16:15:59 +02:00
Sean McGivern
5dd6d9a9ec
Merge branch 'submodules-private' into 'master'
...
Make Gitlab::Git::Repository#submodules private
See merge request !12479
2017-06-28 09:25:45 +00:00
Jacob Vosmaer
cf131bf713
Make Gitlab::Ggit::Repository#submodules private
2017-06-27 16:03:35 +02:00
Jacob Vosmaer
144e37c667
Remove Gitlab::Git::Repository#find_all
2017-06-27 12:30:51 +02:00
Grzegorz Bizon
0430b76441
Enable Style/DotPosition Rubocop 👮
2017-06-21 13:48:12 +00:00
Rémy Coutable
2a39280db0
Merge branch 'moved-submodules' into 'master'
...
repository: index submodules by path
See merge request !10798
2017-06-19 17:51:55 +00:00
David Turner
b30c16aa32
repository: index submodules by path
...
Submodules have a name in the configuration, but this name is simply
the path at which the submodule was initially checked in (by default
-- the name is totally arbitrary). If a submodule is moved, it
retains its original name, but its path changes. Since we discover
submodules inside trees, we have their path but not necessarily their
name.
Make the submodules() function return the submodule hash indexed by
path rather than name, so that renamed submodules can be looked up.
Signed-off-by: David Turner <novalis@novalis.org>
2017-06-16 14:37:13 -04:00
Robert Speicher
a6ec5121f0
Correct RSpec/SingleLineHook cop offenses
2017-06-14 13:18:56 -05:00
Douwe Maan
ffbbd4112e
Move diffable? method from Repository to Diff::File
2017-06-08 09:32:57 -05:00
Bob Van Landuyt
e564fe971f
Rename `Gitlab::Git::EncodingHelper` to `Gitlab::EncodingHelper`
2017-06-01 21:21:14 +00:00
Douwe Maan
0c7dd30c78
Make .gitmodules parsing more resilient to syntax errors
2017-05-30 16:19:36 -05:00
Douwe Maan
6319ca271c
Merge branch 'gitaly-local-branches' into 'master'
...
Incorporate Gitaly's local_branches operation into repo code
Closes #27379
See merge request !10059
2017-05-18 14:22:41 +00:00
Alejandro Rodríguez
925945f01b
Incorporate Gitaly's local_branches operation into repo code
2017-05-17 18:12:10 -04:00
Alejandro Rodríguez
cf09c826a5
Re-enable gitaly migration for ref_name_for_sha after bugfixes
2017-05-16 11:43:37 -04:00
Timothy Andrew
b44eaf8e07
Sort the network graph both by commit date and topographically.
...
- Previously, we sorted commits by date, which seemed to work okay.
- The one edge case where this failed was when multiple commits have the same
commit date (for example: when a range of commits are cherry picked with a
single command, they all have the same commit date [and different author
dates]).
- Commits with the same commit date would be sorted arbitrarily, and usually
break the network graph.
- This commit solves the problem by both sorting by date, and by sorting
topographically (parents aren't displayed until all their children are
displayed)
- Include review comments from @adamniedzielski
A more detailed explanation is present here:
https://gitlab.com/gitlab-org/gitlab-ce/issues/30973#note_28706230
2017-05-04 04:21:12 +00:00
Alejandro Rodríguez
5e0e5801f1
Re-enable ref operations with gitaly after not-found fix
2017-05-02 17:17:58 -03:00
Kim "BKC" Carlbäcker
a998710a3b
Fix RSpec
2017-04-28 13:07:54 +02:00
Timothy Andrew
a7e67604b3
Fix ordering of commits in the network graph.
...
- We upgraded `rugged` to 0.25.1.1 in !10286 for %9.1
- Prior to this upgrade, the default sort order for commits returned by
`Gitlab::Git::Repository#find_commits` was `Rugged::SORT_DATE`, which the
graph relied on.
- While upgrading `rugged`, the MR also changed this default to
`Rugged::SORT_NONE`, which broke commit ordering in the graph.
- This commit adds an option to `Gitlab::Git::Repository#find_commits` to sort
by date, and changes the graph builder `Network::Graph` so it explictly
requests the `:date` sort order
2017-04-27 13:09:54 +00:00
Rémy Coutable
c43f7d4713
Merge branch 'gitaly-testing' into 'master'
...
Setup and run a Gitaly server for testing if GitalyClient is enabled
See merge request !10298
2017-04-12 09:25:09 +00:00
Alejandro Rodríguez
d6cc8feb6c
Setup and run a Gitaly server for testing if GitalyClient is enabled
2017-04-11 16:00:44 -03:00
Rémy Coutable
cb20cfa244
Retrieve Git-specific env in Gitlab::Git::Repository#rugged
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-10 16:10:18 +02:00
Alejandro Rodríguez
267cd3e359
Incorporate Gitaly client for refs service
2017-04-04 16:53:44 +02:00
Sean McGivern
53819c5ac6
Support >1 path in Gitlab::Git::Repository#log
...
This is analogous to `git log -- foo bar baz`, but not the same as
`Gitlab::Git::Repository#log(path: 'foo bar baz')`, which would run `git
log -- 'foo bar baz'`.
2017-03-30 10:21:19 +01:00
Mark Fletcher
4597654079
Fix archive prefix bug for refs containing dots
2017-03-16 21:04:58 +05:30
Rémy Coutable
464ca33747
Allow to override GITLAB_GIT_TEST_REPO_URL to specify a different gitlab-git-test repo
...
We will set this to the dev mirror in GitLab CE and EE on dev.
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-14 18:30:53 +01:00
Oswaldo Ferreira
d13451cd49
Returns correct header data for commits endpoint
2017-03-07 22:56:31 -03:00
George Andrinopoulos
c46f933bb7
Fix pagination headers for repository commits api endpoint
2017-03-07 22:56:31 -03:00
Mark Fletcher
3ac54d22b9
Ensure archive download is only one directory deep
2017-03-02 10:30:24 +05:30
Robert Speicher
cecfcc2edd
Merge branch '23062-allow-git-log-to-accept-follow-and-skip' into 'master'
...
Make Git history follow renames again by performing the --skip in Ruby
Closes #23062
See merge request !9314
2017-02-25 19:58:05 +00:00
Douwe Maan
0625af3bcb
Consistently create, update, and delete files, taking CRLF settings into account
2017-02-24 09:55:01 -06:00
Rémy Coutable
9720bcd83d
Optimize a bit Gitlab::Git::Repository#log_by_shell and its specs
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-02-23 19:06:00 +01:00
Rémy Coutable
3eb0354061
Make Git history follow renames again by performing the --skip in Ruby
...
This hack is needed because of an issue when --follow and --skip
are passed to git log at the same time.
See https://gitlab.com/gitlab-org/gitlab-ce/issues/23062
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-02-23 19:06:00 +01:00
Robert Speicher
2e20a71d21
Ensure internal Gitlab::Git references use the namespace
2017-01-04 19:09:29 -05:00
Robert Speicher
a00578ce5c
Absorb gitlab_git
2017-01-04 19:09:28 -05:00
Dmitriy Zaporozhets
4f2d2c90f7
Move Gitlab::Git out of gitlab core
2013-04-27 23:50:17 +03:00
Dmitriy Zaporozhets
c3bbbff673
specs for repository tag_names, branch_names
2013-04-03 21:21:24 +03:00
Dmitriy Zaporozhets
f8a4a76048
decorate commits in Gitlab::Git::repository with valid class
2013-04-03 21:17:50 +03:00
Dmitriy Zaporozhets
e91ff84df7
keep same dir structure for specs as in lib/
2013-04-03 21:09:07 +03:00