[DRE-commits] [ruby-gitlab-git] 01/02: manually import 10.6.6 version
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Fri Sep 23 15:40:36 UTC 2016
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository ruby-gitlab-git.
commit 7e374403d1c7c64f263a180a8fc7306a747c2b8b
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Fri Sep 23 20:30:52 2016 +0530
manually import 10.6.6 version
---
VERSION | 2 +-
gitlab_git.gemspec | 4 ++--
lib/gitlab_git/attributes.rb | 4 +++-
lib/gitlab_git/blob.rb | 10 ++++++----
4 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/VERSION b/VERSION
index 827886a..77fbf87 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-10.6.4
+10.6.6
diff --git a/gitlab_git.gemspec b/gitlab_git.gemspec
index 17c1ecf..e17bf97 100644
--- a/gitlab_git.gemspec
+++ b/gitlab_git.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = "gitlab_git"
- s.version = "10.6.4"
+ s.version = "10.6.6"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Dmitriy Zaporozhets"]
- s.date = "2016-09-09"
+ s.date = "2016-09-14"
s.description = "GitLab wrapper around git objects"
s.email = "dmitriy.zaporozhets at gmail.com"
s.files = ["VERSION", "lib/gitlab_git.rb", "lib/gitlab_git/attributes.rb", "lib/gitlab_git/blame.rb", "lib/gitlab_git/blob.rb", "lib/gitlab_git/blob_snippet.rb", "lib/gitlab_git/branch.rb", "lib/gitlab_git/commit.rb", "lib/gitlab_git/commit_stats.rb", "lib/gitlab_git/compare.rb", "lib/gitlab_git/diff.rb", "lib/gitlab_git/diff_collection.rb", "lib/gitlab_git/encoding_helper.rb", "lib/gitlab_git/path_helper.rb", "lib/gitlab_git/popen.rb", "lib/gitlab_git/ref.rb", "lib/gitlab_git/reposito [...]
diff --git a/lib/gitlab_git/attributes.rb b/lib/gitlab_git/attributes.rb
index 1abf91d..d007af6 100644
--- a/lib/gitlab_git/attributes.rb
+++ b/lib/gitlab_git/attributes.rb
@@ -116,7 +116,9 @@ module Gitlab
pattern, attrs = line.split(/\s+/, 2)
- pairs << [File.join(@path, pattern), parse_attributes(attrs)]
+ parsed = attrs ? parse_attributes(attrs) : {}
+
+ pairs << [File.join(@path, pattern), parsed]
end
# Newer entries take precedence over older entries.
diff --git a/lib/gitlab_git/blob.rb b/lib/gitlab_git/blob.rb
index 2aa7d93..100eb2e 100644
--- a/lib/gitlab_git/blob.rb
+++ b/lib/gitlab_git/blob.rb
@@ -131,6 +131,7 @@ module Gitlab
ref = commit[:branch]
update_ref = commit[:update_ref].nil? ? true : commit[:update_ref]
parents = []
+ mode = 0o100644
unless ref.start_with?('refs/')
ref = 'refs/heads/' + ref
@@ -154,17 +155,18 @@ module Gitlab
if action == :remove
index.remove(filename)
else
+ file_entry = index.get(filename)
+
if action == :rename
old_path_name = PathHelper.normalize_path(file[:previous_path])
old_filename = old_path_name.to_s
- index.remove(old_filename)
+ file_entry = index.get(old_filename)
+ index.remove(old_filename) unless file_entry.blank?
end
- mode = 0o100644
- file_entry = index.get(filename)
-
if file_entry
raise Repository::InvalidBlobName.new("Filename already exists; update not allowed") unless update
+
# Preserve the current file mode if one is available
mode = file_entry[:mode] if file_entry[:mode]
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gitlab-git.git
More information about the Pkg-ruby-extras-commits
mailing list