Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-09-15 03:57:41 +0300
committerStan Hu <stanhu@gmail.com>2015-09-15 03:57:41 +0300
commit81e741af2445f1e403c02dc172a47ade641eed60 (patch)
treee7d6a3e60c219716041f01bd69e01aea2b514bf6 /app/services
parentc99473e57ca90f95c4e31fc1582fb94731257442 (diff)
parente2ece2bc350bf881e9716e51c01a59eecac65fc9 (diff)
Merge pull request #9138 from liyakun/master
add "replace" and "upload" functionality
Diffstat (limited to 'app/services')
-rw-r--r--app/services/files/create_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb
index c2da0c30bad..ffbb5993279 100644
--- a/app/services/files/create_service.rb
+++ b/app/services/files/create_service.rb
@@ -19,6 +19,8 @@ module Files
end
unless project.empty_repo?
+ @file_path.slice!(0) if @file_path.start_with?('/')
+
blob = repository.blob_at_branch(@current_branch, @file_path)
if blob