public
Fork of Caged/gitnub
Description: A Gitk-like application written in RubyCocoa that looks like it belongs on a Mac. See the wiki for downloads and screenshots.
Homepage: http://alternateidea.com
Clone URL: git://github.com/bricooke/gitnub.git
Search Repo:
Some tomfoolery to system out and figure out what branch is active and 
make that the default instead of defaulting to "master". Surely 
a better way to do this (with grit?), but I don't know it.
bricooke (author)
Sat Apr 12 06:52:18 -0700 2008
commit  a1559ba07bf97c8c0de790807a681ea8ce77842a
tree    1c65f7c3040a867128d286cf6485394cfbcba003
parent  7942044256859e81e12ad8ebfd0ea310916ff5a9
...
26
27
28
29
 
30
31
32
...
26
27
28
 
29
30
31
32
0
@@ -26,7 +26,7 @@
0
     @current_commit_offset = 0
0
     @offset = 50
0
     @active_commit = nil
0
- @branch = :master
0
+ @branch = `cd #{REPOSITORY_LOCATION}/.. && git branch | grep "*" | awk '{print $2}'`.strip.to_sym rescue :master
0
     @icon_queue = NSOperationQueue.alloc.init
0
     @icon_url_map = {}
0
     @icons = Hash.new do |hash, email|

Comments

  • Caged Sat Apr 12 13:24:53 -0700 2008

    Hey bricooke,
    I was told there was a patch in the queue that would add this support for grit. In the meantime, I can apply your workaround.

  • timcharper Thu Apr 17 13:32:50 -0700 2008

    yeah, I’m doing something very similar in the git textmate bundle (looking for the asterisk).
    I suppose another way you could do it would be to look in .git/HEAD. The current branch pointer is stored in there.