module PWN::Plugins::Git

def self.authors

def self.authors
ke.hoopes@gmail.com>

def self.dump_all_repo_branches(opts = {})

def self.dump_all_repo_branches(opts = {})
t_url].to_s.scrub
it_url}`.to_s.scrub
 => e

def self.gen_html_diff(opts = {})

def self.gen_html_diff(opts = {})
ts[:repo].to_s
opts[:branch].to_s
:since]
'<div style="background-color:#CCCCCC; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">'
<< "<h3>#{git_repo_name}->#{git_repo_branch} Diff Summary Since #{since_date}</h3>"
t log --since #{since_date} --stat-width=65535 --graph`.to_s.scrub
<< "<h3>#{git_repo_name}->#{git_repo_branch} Diff Summary Since Last Pull</h3>"
t log ORIG_HEAD.. --stat-width=65535 --graph`.to_s.scrub
rposes
entity)
 git_entity.gsub("\n", '<br />')
 '</div>'
 '<br />'
 => e

def self.get_author(opts = {})

def self.get_author(opts = {})
repo_root]
from_line]
_line]
[:target_file]
 opts[:entry_beautified]
the original author
 the original file
JS-BEAUTIFIED file
d
!(/\.JS-BEAUTIFIED$/, '')
_length = `wc -l #{target_file}`.split.first.to_i
_length = 1 if target_file_line_length < 1 # wc -l doesn't count line is \n is missing
hor_by_line_range(
o_root,
t_file_line_length,
arget_file
i && to_line.to_i < 1
hor_by_line_range(
o_root,
m_line,
ne,
arget_file
 => e

def self.get_author_by_line_range(opts = {})

def self.get_author_by_line_range(opts = {})
[:repo_root].nil?
:repo_root].to_s
rom_line].to_i
line].to_i
:target_file].to_s
r{^#{repo_root}/}, '')
repo_root) && File.file?("#{repo_root}/#{target_file}")
{Shellwords.escape(repo_root)}/.git" log -L #{from_line},#{to_line}:"#{Shellwords.escape(target_file)}" | grep Author | head -n 1`.to_s.scrub
=> e

def self.help

def self.help
#{self}.gen_html_diff(
d git repo name',
red git repo branch (e.g. master, develop, etc)',
al date, otherwise default to last pull'
.get_author(
tional path to git repo root (defaults to ".")'
quired line number to start in range',
ired line number to stop in range',
required file in which line range is queried'
ed: 'required boolean'
s = #{self}.dump_all_repo_branches(
ired git repo url'