@@ -27,9 +27,13 module Redmine | |||||
27 |
|
27 | |||
28 | # Get the revision of a particuliar file |
|
28 | # Get the revision of a particuliar file | |
29 | def get_rev (rev,path) |
|
29 | def get_rev (rev,path) | |
30 | cmd="#{GIT_BIN} --git-dir #{target('')} show #{shell_quote rev} -- #{shell_quote path}" if rev!='latest' and (! rev.nil?) |
|
30 | ||
31 | cmd="#{GIT_BIN} --git-dir #{target('')} log -1 master -- #{shell_quote path}" if |
|
31 | if rev != 'latest' && !rev.nil? | |
32 | rev=='latest' or rev.nil? |
|
32 | cmd="#{GIT_BIN} --git-dir #{target('')} show #{shell_quote rev} -- #{shell_quote path}" | |
|
33 | else | |||
|
34 | branch = shellout("#{GIT_BIN} --git-dir #{target('')} branch") { |io| io.grep(/\*/)[0].strip.match(/\* (.*)/)[1] } | |||
|
35 | cmd="#{GIT_BIN} --git-dir #{target('')} log -1 #{branch} -- #{shell_quote path}" | |||
|
36 | end | |||
33 | rev=[] |
|
37 | rev=[] | |
34 | i=0 |
|
38 | i=0 | |
35 | shellout(cmd) do |io| |
|
39 | shellout(cmd) do |io| |
General Comments 0
You need to be logged in to leave comments.
Login now