Robert Speicher
3da9cb6929
Merge branch 'fix/reduce-number-of-find-commit-for-log-tree' into 'master'
...
Reduce number of FindCommit calls from RefsController#logs_tree
Closes gitaly#1057
See merge request gitlab-org/gitlab-ce!17566
2018-03-07 17:53:16 +00:00
Zeger-Jan van de Weg
0136bbbb89
Move OperationService#UserRemoveBranch
...
Part of: gitlab-org/gitaly#476
2018-03-07 14:52:57 +01:00
Zeger-Jan van de Weg
790d5147e3
Move OperationService#UserCreateBranch
...
Part of: gitlab-org/gitaly#476
2018-03-07 14:52:57 +01:00
Zeger-Jan van de Weg
113d9d6475
Move CommitService#Languages to OPT_OUT
...
Part of: gitlab-org/gitlab-ce!17561
2018-03-07 14:52:57 +01:00
Zeger-Jan van de Weg
e0931b3af1
Move RefService#CreateBranch to OPT_OUT
...
Part of: gitlab-org/gitaly#540
2018-03-07 14:52:57 +01:00
Zeger-Jan van de Weg
4604e2c6db
Move RefService#DeleteBranch to OPT_OUT
...
Part of: gitlab-org/gitaly#546
2018-03-07 14:52:57 +01:00
Zeger-Jan van de Weg
1985300134
Move OperationService#UserRevert to OPT_OUT
...
Part of: gitlab-org/gitaly#779
2018-03-07 14:52:56 +01:00
Zeger-Jan van de Weg
718011748a
Move OperationService#UserAddTag to OPT_OUT
...
Part of: gitlab-org/gitaly#541
2018-03-07 14:52:56 +01:00
Zeger-Jan van de Weg
2cdbfef109
Move Repository#HasLocalBranches to OPT_OUT
...
Part of gitlab-org/gitaly#616
2018-03-07 08:47:53 +01:00
Ahmad Sherif
37162a5fa6
Reduce number of FindCommit calls from RefsController#logs_tree
...
Fixes gitaly#1057
The old code was calling LastCommitForPath to extract a commit ID _then_
call FindCommit to get a commit it already had in the first place!
2018-03-06 15:27:03 +01:00
Ahmad Sherif
cd770946c4
Add support for :all option to {count,find}_commits
2018-03-02 14:55:20 +01:00
Sean McGivern
52e133d176
Merge branch 'zj-licensee-key' into 'master'
...
Client implementation for Licensee#key
See merge request gitlab-org/gitlab-ce!17449
2018-03-01 17:10:39 +00:00
Douwe Maan
de454de9b1
Merge branch '42434-allow-commits-endpoint-to-work-over-all-commits' into 'master'
...
Resolve "Allow API method /projects/:id/repository/commits to work over all commits"
Closes #42434
See merge request gitlab-org/gitlab-ce!17182
2018-03-01 15:54:43 +00:00
Zeger-Jan van de Weg
34fbade4ae
Client implementation for Licensee#key
...
Part of the migration as tracked in: gitlab-org/gitaly#1026
2018-03-01 16:41:08 +01:00
Tiago Botelho
cd9daf644e
Add specs
2018-03-01 14:38:35 +00:00
Sean McGivern
e351f67874
Suppress whitespace warnings in squash error messages
...
These are obscuring the real error, which is confusing for everyone.
2018-02-26 09:08:17 +00:00
Tiago Botelho
442a6e8800
API method /projects/:id/repository/commits now works over every commit
2018-02-23 10:09:46 +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
Grzegorz Bizon
15196f9269
Merge branch 'ce-gitaly-squash-in-progress' into 'master'
...
[CE] Incorporate Gitaly's RepositoryService.IsSquashInProgress RPC
See merge request gitlab-org/gitlab-ce!17002
2018-02-22 08:03:15 +00:00
Alejandro Rodríguez
acc0e25de7
Incorporate Gitaly's RepositoryService.IsSquashInProgress RPC
2018-02-21 17:35:31 -03: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
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
Ahmad Sherif
8cdb3477b0
Remove allow_n_plus_1 from Git::Repository#branches_filter
2018-02-08 19:20:46 +01:00
Sean McGivern
683984f2e3
Merge branch 'zj-refs-hash' into 'master'
...
Don't use rugged in Repository#refs_hash
Closes gitaly#880
See merge request gitlab-org/gitlab-ce!16827
2018-02-07 15:42:55 +00: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
Douwe Maan
7095c2bf40
Merge branch '42730-close-rugged-repository' into 'master'
...
Resolve "ProjectCacheWorker leaks file descriptors"
Closes #42730
See merge request gitlab-org/gitlab-ce!16930
2018-02-06 17:49:00 +00:00
Robert Speicher
245d937514
Merge branch 'gitaly-lfs-client-prep' into 'master'
...
Refactor Gitlab::Git code related to LFS changes for Gitaly migration
Closes gitaly#980
See merge request gitlab-org/gitlab-ce!16835
2018-02-06 17:35:08 +00:00
Bastian Blank
285d5d526b
Close low level rugged repository in project cache worker
...
Signed-off-by: Bastian Blank <waldi@debian.org>
2018-02-06 16:36:35 +00: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
Douwe Maan
295ff65d62
Merge branch 'zj-ref-contains' into 'master'
...
Client changes for Tag,BranchNamesContainingCommit
See merge request gitlab-org/gitlab-ce!16789
2018-02-04 11:31:49 +00:00
Alejandro Rodríguez
e60bf2f256
Incorporate OperationService.UserSquash Gitaly RPC
2018-02-02 19:02:40 -03:00
Alejandro Rodríguez
98affa75ed
Refactor Gitlab::Git code related to LFS changes for Gitaly migration
...
We stop relying on Gitlab::Git::Env for the RevList class, and use
Gitlab::Git::Repository#run_git methods inteaad. The refactor also fixes
another issue, since we now top using "path_to_repo" (which is a
Repository model method).
2018-02-02 16:27:01 -03:00
Douwe Maan
26debb120e
Merge branch 'master' into 'zj-ref-contains'
...
# Conflicts:
# lib/gitlab/git/repository.rb
2018-02-01 20:22:04 +00: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
Zeger-Jan van de Weg
fd46d6ceb8
Remove intermediate methods on Branch and Tag classes
2018-02-01 13:00:38 +01:00
Zeger-Jan van de Weg
0a47d1924d
Client changes for Tag,BranchNamesContainingCommit
...
As part of gitlab-org/gitaly#884 , this commit contains the client
implementation for both TagNamesContaintingCommit and
BranchNamesContainingCommit. The interface in the Repository model stays
the same, but the implementation on the serverside, e.g. Gitaly, uses
`for-each-ref`, as opposed to `branch` or `tag` which both aren't
plumbing command. The result stays the same.
On the serverside, we have the opportunity to limit the number of names
to return. However, this is not supported on the front end yet. My
proposal to use this ability: gitlab-org/gitlab-ce#42581 . For now, this
ability is not used as that would change more behaviours on a feature
flag which might lead to unexpected changes on page refresh for example.
2018-02-01 13:00:33 +01: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
Douwe Maan
283c0a9d28
Merge branch 'repository-log-disable-walk' into 'master'
...
Remove Rugged::Walk implementation of #log
See merge request gitlab-org/gitlab-ce!16798
2018-01-31 21:54:02 +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
Grzegorz Bizon
dacd9dbef4
Merge branch 'fix/move-can-be-merged-to-lib-git' into 'master'
...
Move Repository#can_be_merged? to Gitlab::Git::Repository
Closes #42544
See merge request gitlab-org/gitlab-ce!16771
2018-01-31 11:02:09 +00: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
Douwe Maan
40e128730f
Merge branch 'gitaly-784-repo-write-ref' into 'master'
...
Migrate Git::Repository#write_ref to Gitaly
Closes gitaly#784
See merge request gitlab-org/gitlab-ce!16513
2018-01-30 18:48:56 +00:00
Ahmad Sherif
11191f938c
Move Repository#can_be_merged? to Gitlab::Git::Repository
...
Fixes #42544
2018-01-30 19:05:34 +01:00
Jacob Vosmaer (GitLab)
5c2fe2d3d7
Decouple more of Repository from Rugged
2018-01-30 16:21:55 +00:00
Kim "BKC" Carlbäcker
10fb904d63
Migrate Git::Repository#write_ref to Gitaly
2018-01-30 12:22:31 +01:00