summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-09 12:07:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-09 12:07:35 +0000
commit6157d20ec012fb34da66f0fe921b32036d582264 (patch)
tree886b85026790d57edb2f45ce11735af8afe16579 /lib
parent858eba2f1ca63f7ee643171e3edd63e60e69901a (diff)
downloadredmine-6157d20ec012fb34da66f0fe921b32036d582264.tar.gz
redmine-6157d20ec012fb34da66f0fe921b32036d582264.zip
Git adapter: use commit time instead of author time (#2108).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1999 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/scm/adapters/git_adapter.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb
index c74aac7c1..47c192105 100644
--- a/lib/redmine/scm/adapters/git_adapter.rb
+++ b/lib/redmine/scm/adapters/git_adapter.rb
@@ -29,10 +29,10 @@ module Redmine
def get_rev (rev,path)
if rev != 'latest' && !rev.nil?
- cmd="#{GIT_BIN} --git-dir #{target('')} show --date=iso #{shell_quote rev} -- #{shell_quote path}"
+ cmd="#{GIT_BIN} --git-dir #{target('')} show --date=iso --pretty=fuller #{shell_quote rev} -- #{shell_quote path}"
else
branch = shellout("#{GIT_BIN} --git-dir #{target('')} branch") { |io| io.grep(/\*/)[0].strip.match(/\* (.*)/)[1] }
- cmd="#{GIT_BIN} --git-dir #{target('')} log --date=iso -1 #{branch} -- #{shell_quote path}"
+ cmd="#{GIT_BIN} --git-dir #{target('')} log --date=iso --pretty=fuller -1 #{branch} -- #{shell_quote path}"
end
rev=[]
i=0
@@ -63,7 +63,7 @@ module Redmine
value = $2
if key == "Author"
changeset[:author] = value
- elsif key == "Date"
+ elsif key == "CommitDate"
changeset[:date] = value
end
elsif (parsing_descr == 0) && line.chomp.to_s == ""
@@ -96,7 +96,6 @@ module Redmine
return rev
end
-
def info
revs = revisions(url,nil,nil,{:limit => 1})
if revs && revs.any?
@@ -138,7 +137,7 @@ module Redmine
def revisions(path, identifier_from, identifier_to, options={})
revisions = Revisions.new
- cmd = "#{GIT_BIN} --git-dir #{target('')} log --raw --date=iso"
+ cmd = "#{GIT_BIN} --git-dir #{target('')} log --raw --date=iso --pretty=fuller"
cmd << " --reverse" if options[:reverse]
cmd << " -n #{options[:limit].to_i} " if (!options.nil?) && options[:limit]
cmd << " #{shell_quote(identifier_from + '..')} " if identifier_from
@@ -177,7 +176,7 @@ module Redmine
value = $2
if key == "Author"
changeset[:author] = value
- elsif key == "Date"
+ elsif key == "CommitDate"
changeset[:date] = value
end
elsif (parsing_descr == 0) && line.chomp.to_s == ""