Jasper Maes
d17d3ec7f7
Split repository search result on \n instead of $ to prevent the items of the array to start with a newline. Remove the strip from parsing the search result to keep result endlines.
2018-03-19 19:09:31 +01:00
James Edwards-Jones
c1e3942122
Extract constant for LfsPointerFile::VERSION_LINE
2018-03-16 13:35:03 +00:00
James Edwards-Jones
9d32fccfa7
Avoid printing data for LfsPointerFile#inspect
2018-03-15 21:49:02 +00:00
James Edwards-Jones
ca66a04ffe
Lfs::FileTranformer caches .gitattributes parser
...
Prevents `.gitattributes` blob lookup being repeated for every file checked at a given ref
2018-03-15 21:49:01 +00:00
Nick Thomas
91ff0eaa13
Respect the configured git path for imported gitlab-shell operations
2018-03-12 16:03:00 +00:00
Douwe Maan
47b9854dac
Merge branch 'gitaly-fsck-mandatory' into 'master'
...
Make 'git fsck' mandatory
See merge request gitlab-org/gitlab-ce!17648
2018-03-08 22:21:04 +00:00
Kim "BKC" Carlbäcker
3ddde75a1b
Make 'git fsck' mandatory
2018-03-08 16:27:31 +01:00
Jacob Vosmaer
f45c66e5b0
Remove duplicate method definitions
2018-03-08 12:50:42 +01:00
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
635d5bf2a2
Move CommitService::CommitPatch to OPT_OUT
...
Part of gitlab-org/gitaly#324
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
Nick Thomas
0649a1f835
Merge branch 'sh-make-prune-optional-in-git-fetch' into 'master'
...
Make --prune a configurable parameter in fetching a git remote
See merge request gitlab-org/gitlab-ce!17346
2018-03-07 02:02:24 +00: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
Rémy Coutable
af84ccbd82
Merge branch '40187-project-branch-dashboard-with-active-stale-branches' into 'master'
...
Add overview of branches and filtered views for active/stale branches
Closes #40187 et #17293
See merge request gitlab-org/gitlab-ce!15402
2018-03-06 13:14:10 +00:00
Takuya Noguchi
580d895363
Add overview of branches and a filter for active/stale branches
2018-03-06 21:28:14 +09:00
Stan Hu
e9fad3e501
Make --prune a configurable parameter in fetching a git remote
...
By default, --prune is added to the command-line of a `git fetch` operation,
but for repositories with many references this can take a long time to run. We
shouldn't need to run --prune the first time we fetch a new repository.
2018-03-06 00:10:04 -08:00
Douwe Maan
0736197f63
Merge branch 'gitaly-lfs-changes' into 'master'
...
Incorporate Gitaly's RPCs for Gitlab::Git::LfsChanges
Closes gitaly#1048
See merge request gitlab-org/gitlab-ce!16973
2018-03-05 15:43:26 +00:00
Douwe Maan
899967fbd8
Merge branch 'feature/add-support-for-all-option-in-count-find-commits' into 'master'
...
Add support for :all option to {count,find}_commits
See merge request gitlab-org/gitlab-ce!17464
2018-03-05 15:41:49 +00:00
Alejandro Rodríguez
0a4ee10eda
Fix n+1 issue by not reloading fully loaded blobs
2018-03-05 11:14:43 -03:00
Alejandro Rodríguez
a0a7b551ae
Incorporate Gitaly's RPCs for Gitlab::Git::LfsChanges
2018-03-02 17:12:08 -03:00
Ahmad Sherif
cd770946c4
Add support for :all option to {count,find}_commits
2018-03-02 14:55:20 +01:00
Sean McGivern
40c61acb6a
Merge branch 'feature/fetch-commit-signs-from-gitaly-in-batch' into 'master'
...
Fetch commit signatures from Gitaly in batches
Closes gitaly#1046
See merge request gitlab-org/gitlab-ce!17456
2018-03-02 11:16:20 +00:00
Ahmad Sherif
03f3350f3f
Fetch commit signatures from Gitaly in batches
...
Closes gitaly#1046
2018-03-01 18:31:31 +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
Kim Carlbäcker
17b91050ba
Re-enable the remaning Wiki Gitaly-Endpoints
2018-02-28 13:23:26 +00:00
Robert Speicher
e0195f3369
Merge branch 'feature/migrate-recursive-tree-entries-fetching' into 'master'
...
Migrate recursive tree entries fetching to Gitaly
See merge request gitlab-org/gitlab-ce!17191
2018-02-26 16:26:28 +00:00
Ahmad Sherif
c370f53cb6
Migrate recursive tree entries fetching to Gitaly
2018-02-26 16:59:29 +01: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
Sean McGivern
0b032daa11
Merge branch '32564-fix-double-system-closing-notes' into 'master'
...
Resolve "Double closing system notes when closing issue with Merge Request"
Closes #32546 and #32564
See merge request gitlab-org/gitlab-ce!17035
2018-02-19 11:50:28 +00:00
Sean McGivern
23dd313d76
Convert Gitaly commit parent IDs to array as early as possible
...
The tracking issue if this causes problems is
https://gitlab.com/gitlab-org/gitaly/issues/1028
2018-02-19 11:21:23 +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
Micaël Bergeron
af5cd10e00
applying feedback
...
# modified: lib/gitlab/git/commit.rb
2018-02-16 13:51:19 -05:00
Micaël Bergeron
f949255461
fix specs
2018-02-16 13:51:19 -05:00
Ahmad Sherif
8cdb3477b0
Remove allow_n_plus_1 from Git::Repository#branches_filter
2018-02-08 19:20:46 +01:00
Ahmad Sherif
dabc703a29
Migrate Git::Blob.batch to Gitaly
...
Closes gitaly#985
2018-02-08 00:26:45 +01:00
Francisco Javier López
d40912bb49
Removing gitaly flags
2018-02-07 16:33:12 +00: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
Stan Hu
bc59a5d0a5
Merge branch 'dm-git-hook-popen' into 'master'
...
Only set cwd on the newly spawned process, instead of the current one
See merge request gitlab-org/gitlab-ce!16958
2018-02-06 19:17:22 +00:00
Douwe Maan
81b5ce1152
Only set cwd on the newly spawned process, instead of the current one
2018-02-06 12:19:48 -06: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
Douwe Maan
a480ee184b
Merge branch 'zj/gitlab-ce-zj-wiki-page-versions'
2018-02-06 11:41:09 -06: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
Sean McGivern
f81306e76f
Merge branch 'jej/upload-file-tracks-lfs' into 'master'
...
File upload UI obeys LFS filter
Closes #29876
See merge request gitlab-org/gitlab-ce!16412
2018-02-06 16:24:54 +00:00
Douwe Maan
5db5a9cbd1
Merge branch 'master' into 'zj-wiki-page-versions'
...
# Conflicts:
# Gemfile
# Gemfile.lock
2018-02-06 16:08:06 +00:00
James Edwards-Jones
d2a77094ae
File upload UI obeys LFS filters
...
Uses Lfs::FileModificationHandler to coordinate LFS detection, creation of LfsObject, etc
Caveats:
1. This isn't used by the multi-file editor / Web IDE
2. This isn't used on rename. We'd need to be able to download LFS files
and add them to the commit if they no longer match so not as simple.
3. We only check the root .gitattributes file, so this should be improved
to correctly check for nested .gitattributes files in subfolders.
2018-02-06 15:26:25 +00:00
Francisco Javier López
27c08a1689
Allow moving wiki pages from the UI
2018-02-05 17:17:21 +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
Sean McGivern
a0fc0fcc53
Merge branch 'rugged-reference-cache-rescue' into 'master'
...
Stop rescuing Rugged::Reference in Repository cache
See merge request gitlab-org/gitlab-ce!16770
2018-01-31 14:00:37 +00: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
Robert Speicher
95b4f7ea37
Merge branch 'feature/migrate-wiki-page-formatted-data-to-gitaly' into 'master'
...
Migrate fetching wiki page formatted content to Gitaly
Closes gitaly#958
See merge request gitlab-org/gitlab-ce!16716
2018-01-30 20:47:23 +00: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
a6dbb85e97
Remove Rugged exception in cache rescue
2018-01-30 17:51:56 +01:00
Jacob Vosmaer (GitLab)
5c2fe2d3d7
Decouple more of Repository from Rugged
2018-01-30 16:21:55 +00:00
Ahmad Sherif
fa9d47f221
Migrate fetching wiki page formatted content to Gitaly
...
Closes gitaly#958
2018-01-30 17:19:39 +01:00
Kim "BKC" Carlbäcker
10fb904d63
Migrate Git::Repository#write_ref to Gitaly
2018-01-30 12:22:31 +01:00
Jacob Vosmaer (GitLab)
e407c2d18f
Don't allow Repository#log with limit zero
2018-01-29 15:27:46 +00:00
Jacob Vosmaer (GitLab)
3f79376c76
Set alternate object directories in run_git
2018-01-29 08:51:25 +00: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
Rémy Coutable
26c4dea7ad
Merge branch 'lint-rugged' into 'master'
...
Add a lint check to restrict use of Rugged
See merge request gitlab-org/gitlab-ce!16656
2018-01-25 17:52:01 +00:00
Rémy Coutable
5c68c839c0
Merge branch 'contrain-run-git' into 'master'
...
Make Gitlab::Git::Repository#run_git private
See merge request gitlab-org/gitlab-ce!16622
2018-01-25 16:17:02 +00:00
Grzegorz Bizon
9df130ff22
Merge branch 'fix/batch-lfs-pointers-accepting-lazy-enum' into 'master'
...
Fix .batch_lfs_pointers accepting a lazy enumerator
See merge request gitlab-org/gitlab-ce!16701
2018-01-25 14:28:48 +00:00
Jacob Vosmaer (GitLab)
9e6ce87727
Make Gitaly RepositoryExists opt-out
2018-01-25 13:59:35 +00:00
Ahmad Sherif
07b0beb004
Fix .batch_lfs_pointers accepting a lazy enumerator
2018-01-25 14:11:27 +01:00
Jacob Vosmaer
6d6f7536bd
Look for rugged with static analysis
2018-01-25 14:05:11 +01:00
Douwe Maan
eab9ffeff6
Merge branch 'revert-430b3f0e' into 'master'
...
Revert "Merge branch 'remove-rugged-walk' into 'master'"
See merge request gitlab-org/gitlab-ce!16676
2018-01-25 11:15:07 +00:00
Rémy Coutable
d2bf53942f
Merge branch 'jej/gitattributes-check-at-ref' into 'master'
...
Can parse root .gitattributes file for a ref
See merge request gitlab-org/gitlab-ce!16418
2018-01-25 11:01:36 +00:00