Skip to content

Commit

Permalink
Select active branch when starting up
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin authored and Justin Palmer committed Apr 23, 2008
1 parent a033963 commit f7b3f6b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CommitsController.rb
Expand Up @@ -36,7 +36,8 @@ def awakeFromNib
hash[email] = NSImage.imageNamed(NSImageNameUser)
end

if(fetch_git_repository)
if fetch_git_repository
fetch_git_branch
setup_commit_detail_view
fetch_commits_for @branch, @offset
setup_branches_menu
Expand Down Expand Up @@ -235,6 +236,11 @@ def fetch_git_repository
end
end

def fetch_git_branch
head = @repo.head || @repo.heads.first
@branch = head.name.to_sym
end

def fetch_commits_for(branch, quanity, offset = 0)
@commits = @repo.commits(branch, quanity, offset)
end
Expand Down

0 comments on commit f7b3f6b

Please sign in to comment.