diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-05-04 12:16:32 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-04 12:16:32 +0000 |
commit | 2d23cb1b9fa9fed19ce66998c5b4177ee13ef5f3 (patch) | |
tree | 7473505025b12205c61923bfda7964fe87aee9f6 | |
parent | 96373b0bcf0798a91e64f57620d55e6973b7bd4c (diff) | |
parent | 8cbabe43be4def12b2bbfdd02f66137cbd2a4851 (diff) | |
download | gitlab-ce-2d23cb1b9fa9fed19ce66998c5b4177ee13ef5f3.tar.gz |
Merge branch 'gitaly-note-duplication' into 'master'
Add note about rebase/squash duplication in Gitaly
See merge request gitlab-org/gitlab-ce!18741
-rw-r--r-- | lib/gitlab/git/repository.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 84d37f77fbb..60ce8cfc195 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -20,6 +20,9 @@ module Gitlab GIT_ALTERNATE_OBJECT_DIRECTORIES_RELATIVE ].freeze SEARCH_CONTEXT_LINES = 3 + # In https://gitlab.com/gitlab-org/gitaly/merge_requests/698 + # We copied these two prefixes into gitaly-go, so don't change these + # or things will break! (REBASE_WORKTREE_PREFIX and SQUASH_WORKTREE_PREFIX) REBASE_WORKTREE_PREFIX = 'rebase'.freeze SQUASH_WORKTREE_PREFIX = 'squash'.freeze GITALY_INTERNAL_URL = 'ssh://gitaly/internal.git'.freeze @@ -1671,10 +1674,14 @@ module Gitlab end end + # This function is duplicated in Gitaly-Go, don't change it! + # https://gitlab.com/gitlab-org/gitaly/merge_requests/698 def fresh_worktree?(path) File.exist?(path) && !clean_stuck_worktree(path) end + # This function is duplicated in Gitaly-Go, don't change it! + # https://gitlab.com/gitlab-org/gitaly/merge_requests/698 def clean_stuck_worktree(path) return false unless File.mtime(path) < 15.minutes.ago |