public
Description: The Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/timcharper/git-tmbundle.git
Search Repo:
path for project home now showing as "./" in commit dialog.  
Path always displays relative to project_path, if it exists.
message for directory is clean more explicit (rather than showing nothing 
if you simply selected a scope with no changes, it tells you that's the 
case, with a hint to select the project root folder).
timcharper (author)
Wed Mar 12 12:04:03 -0700 2008
commit  0c5475f0b2fe883ab42d6130d72b09c5a6ad57de
tree    d89c62a1de7cd38b77eae5c787604aba13e090d3
parent  26de3c6734e9ce806d1112daadc4ed5903849f60
...
2
3
4
5
6
7
8
9
10
11
12
...
31
32
33
34
 
35
36
37
...
39
40
41
42
 
 
 
 
 
 
43
44
45
...
2
3
4
 
 
 
 
 
5
6
7
...
26
27
28
 
29
30
31
32
...
34
35
36
 
37
38
39
40
41
42
43
44
45
0
@@ -2,11 +2,6 @@ CW = ENV['TM_SUPPORT_PATH'] + '/bin/CommitWindow.app/Contents/MacOS/CommitWindow
0
 
0
 class CommitController < ApplicationController
0
   def index
0
- if git.clean_directory?
0
- puts "Working directory is clean (nothing to commit)"
0
- return
0
- end
0
-
0
     if git.merge_message
0
       @status = git.status
0
       @message = git.merge_message
0
@@ -31,7 +26,7 @@ class CommitController < ApplicationController
0
       
0
     def run_partial_commit
0
       target_file_or_dir = git.paths.first
0
- puts "<h1>Committing Files in ‘#{htmlize(shorten(target_file_or_dir))}’</h1>"
0
+ puts "<h1>Committing Files in ‘#{htmlize(shorten(target_file_or_dir, ENV['TM_PROJECT_DIRECTORY']))}’ on branch ‘#{htmlize(git.branch.current_name)}’</h1>"
0
       flush
0
 
0
       files, statuses = [], []
0
@@ -39,7 +34,12 @@ class CommitController < ApplicationController
0
         files << e_sh(shorten(e[:path], @base))
0
         statuses << e_sh(e[:status][:short])
0
       end
0
-
0
+
0
+ if files.empty?
0
+ puts (git.clean_directory? ? "Working directory is clean (nothing to commit)" : "No changes to commit within the current scope. (Try selecting the root folder in the project drawer?)")
0
+ return
0
+ end
0
+
0
       msg, files = show_commit_dialog(files, statuses)
0
 
0
       unless files.empty?
...
18
19
20
 
 
21
22
23
...
18
19
20
21
22
23
24
25
0
@@ -18,6 +18,8 @@ def shorten(path, base = nil)
0
   case
0
   when base && path =~ /^#{Regexp.escape base}\/(.+)$/
0
     $1
0
+ when base && path =~ /^#{Regexp.escape base}\/?$/
0
+ "./"
0
   when path == project_path
0
     File.basename(path)
0
   when ENV['TM_PROJECT_DIRECTORY'] && path =~ /^#{Regexp.escape ENV['TM_PROJECT_DIRECTORY']}\/(.+)$/

Comments

    No one has commented yet.