public
Description: The Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/timcharper/git-tmbundle.git
Search Repo:
bugfix - don't blow up when a submodule version number conflicts
timcharper (author)
Thu May 15 12:36:07 -0700 2008
commit  f0058889d6380b9b14a46eea120609e2863781a8
tree    8ad399b60ac01ed1774f306bcbb24c9d020c51ee
parent  2f18e49dd0e4ee60ee0421a9854cf0d504829737
...
41
42
43
44
45
46
47
 
48
 
 
49
50
51
...
57
58
59
 
 
 
 
 
60
61
62
...
41
42
43
 
 
 
 
44
45
46
47
48
49
50
...
56
57
58
59
60
61
62
63
64
65
66
0
@@ -41,11 +41,10 @@ module Parsers
0
           "M"
0
         when "unmerged"
0
           # do a quick check to see if the merge is resolved
0
- file_contents = File.exist?(filename) ? File.read(filename) : ""
0
- if /^={7}$/.match(file_contents) && /^\<{7} /.match(file_contents) && /^>{7} /.match(file_contents)
0
- "C"
0
- else
0
+ if File.directory?(filename) # it's a submodule
0
             "G"
0
+ else
0
+ file_has_conflict_markers(filename) ? "C" : "G"
0
           end
0
         else
0
           "?"
0
@@ -57,6 +56,11 @@ module Parsers
0
     file_statuses
0
   end
0
   
0
+ def file_has_conflict_markers(filename)
0
+ file_contents = File.exist?(filename) ? File.read(filename) : ""
0
+ /^={7}$/.match(file_contents) && /^\<{7} /.match(file_contents) && /^>{7} /.match(file_contents)
0
+ end
0
+
0
   def parse_commit(commit_output)
0
     result = {:output => ""}
0
     commit_output.split("\n").each do |line|

Comments

    No one has commented yet.