Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

applies Vijay's patch in #32 of voloko's repo

  • Loading branch information...
commit 055fe2a8b9ded985158f65d66fe1ae2a5402a10d 1 parent fa3277f
@fxn authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/sdoc/github.rb
View
6 lib/sdoc/github.rb
@@ -27,7 +27,7 @@ def have_git?
def commit_sha1(path)
return false unless have_git?
name = File.basename(path)
- s = Dir.chdir(File.join(basedir, File.dirname(path))) do
+ s = Dir.chdir(File.join(base_dir, File.dirname(path))) do
`git log -1 --pretty=format:"commit %H" #{name}`
end
m = s.match(/commit\s+(\S+)/)
@@ -36,7 +36,7 @@ def commit_sha1(path)
def repository_url(path)
return false unless have_git?
- s = Dir.chdir(File.join(basedir, File.dirname(path))) do
+ s = Dir.chdir(File.join(base_dir, File.dirname(path))) do
`git config --get remote.origin.url`
end
m = s.match(%r{github.com[/:](.*)\.git$})
@@ -44,7 +44,7 @@ def repository_url(path)
end
def path_relative_to_repository(path)
- absolute_path = File.join(basedir, path)
+ absolute_path = File.join(base_dir, path)
root = path_to_git_dir(File.dirname(absolute_path))
absolute_path[root.size..absolute_path.size]
end
Please sign in to comment.
Something went wrong with that request. Please try again.