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/dustin/gitnub.git
Search Repo:
Make nub (or open -a GitNub) work from subdirectories
kballard (author)
Fri Mar 21 16:38:45 -0700 2008
commit  cd89473f5e13a271cae42f605cd70a9c3793d98e
tree    abb43ab3dad4476c25ed030c99f05b7423d3a41b
parent  afbdb35bda395a2828873838791fce8277d89de4
...
7
8
9
 
10
11
12
...
16
17
18
19
 
 
 
 
20
21
22
...
7
8
9
10
11
12
13
...
17
18
19
 
20
21
22
23
24
25
26
0
@@ -7,6 +7,7 @@
0
 #
0
 $VERBOSE = nil
0
 require 'rubygems'
0
+require 'pathname'
0
 require 'osx/cocoa'
0
 require 'mime-types/lib/mime/types'
0
 require 'grit/lib/grit'
0
@@ -16,7 +17,10 @@ require 'InfoWindowController'
0
 OSX.ns_import 'CommitSummaryCell'
0
 include OSX
0
 
0
-REPOSITORY_LOCATION = ENV['PWD'].nil? ? '' : ENV['PWD']
0
+# we use ENV['PWD'] instead of Dir.getwd if it exists so
0
+# `open GitNub` will work, since that launches us at / but leaves ENV['PWD'] intact
0
+pwd = Pathname.new(ENV['PWD'].nil? ? Dir.getwd : ENV['PWD'])
0
+REPOSITORY_LOCATION = pwd + `cd #{pwd} && git rev-parse --git-dir 2>/dev/null`.chomp
0
 
0
 class ApplicationController < OSX::NSObject
0
   ib_outlet :commits_table

Comments

    No one has commented yet.