예제 #1
0
 def update_git_file(self):
     # the git repo won't change that often
     # so we can easily wait 5 seconds
     # between updates for performance
     if ViewCollection.git_time(self.view) > 5:
         open(self.git_temp_file.name, 'w').close()
         args = [
             self.git_binary_path,
             '--git-dir=' + self.git_dir,
             '--work-tree=' + self.git_tree,
             'show',
             ViewCollection.get_compare() + ':' + self.git_path,
         ]
         try:
             contents = self.run_command(args)
             contents = contents.replace(b'\r\n', b'\n')
             contents = contents.replace(b'\r', b'\n')
             f = open(self.git_temp_file.name, 'wb')
             f.write(contents)
             f.close()
             ViewCollection.update_git_time(self.view)
         except Exception:
             pass
예제 #2
0
 def update_git_file(self):
     # the git repo won't change that often
     # so we can easily wait 5 seconds
     # between updates for performance
     if ViewCollection.git_time(self.view) > 5:
         open(self.git_temp_file.name, 'w').close()
         args = [
             self.git_binary_path,
             '--git-dir=' + self.git_dir,
             '--work-tree=' + self.git_tree,
             'show',
             ViewCollection.get_compare() + ':' + self.git_path,
         ]
         try:
             contents = self.run_command(args)
             contents = contents.replace(b'\r\n', b'\n')
             contents = contents.replace(b'\r', b'\n')
             f = open(self.git_temp_file.name, 'wb')
             f.write(contents)
             f.close()
             ViewCollection.update_git_time(self.view)
         except Exception:
             pass
예제 #3
0
 def run(self):
     comparing = ViewCollection.get_compare()
     sublime.message_dialog("GitGutter is comparing against: " + comparing)
예제 #4
0
 def run(self):
     comparing = ViewCollection.get_compare()
     sublime.message_dialog("GitGutter is comparing against: " + comparing)