Skip to content

Commit

Permalink
Respect the current branch by default
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Melo <[email protected]>
  • Loading branch information
melo committed May 31, 2008
1 parent a0621d9 commit 933ceea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Support/lib/git_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ def github_remotes
end
end

def file_to_github_url(github_remote, branch='master', file=nil)
def file_to_github_url(github_remote, branch=nil, file=nil)
file ||= target_file
branch ||= @git.current_branch
repo = repo_for_remote(github_remote)
path = file.gsub(working_path, '').gsub(%r{\A/},'')
if repo =~ %r{github\.com[:/]([^/]+)/([^.]+)\.git}
Expand Down

0 comments on commit 933ceea

Please sign in to comment.