summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-10-05 17:30:44 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-10-05 17:30:44 +0800
commite25abf5be63a6fc124d9fb33d042897fb2a09d82 (patch)
treef5f04bfd76e21ef1e6f314cc9584de516daa3237
parent6ba961499c732d930d4939c0fa3743afa20fd2a8 (diff)
downloadgitlab-ce-e25abf5be63a6fc124d9fb33d042897fb2a09d82.tar.gz
Use simple path for tmp ref, avoiding extra dir
So that we don't have to worry about cleaning empty directories later. This was brought up at: https://gitlab.com/gitlab-org/gitlab-ce/issues/38689#note_42242988
-rw-r--r--lib/gitlab/git/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 89b654253cb..e42bbb659b4 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -990,7 +990,7 @@ module Gitlab
tmp_ref = fetch_ref(
start_repository,
source_ref: "#{Gitlab::Git::BRANCH_REF_PREFIX}#{start_branch_name}",
- target_ref: "refs/tmp/#{SecureRandom.hex}/head"
+ target_ref: "refs/tmp/#{SecureRandom.hex}"
)
yield commit(sha)