File tree 2 files changed +14
-8
lines changed 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -27,17 +27,22 @@ def untracked
27
27
def pretty
28
28
out = ''
29
29
self . each do |file |
30
- out << file . path
31
- out << "\n \t sha(r) " + file . sha_repo . to_s + ' ' + file . mode_repo . to_s
32
- out << "\n \t sha(i) " + file . sha_index . to_s + ' ' + file . mode_index . to_s
33
- out << "\n \t type " + file . type . to_s
34
- out << "\n \t stage " + file . stage . to_s
35
- out << "\n \t untrac " + file . untracked . to_s
36
- out << "\n "
30
+ out << pretty_file ( file )
37
31
end
38
32
out << "\n "
39
33
out
40
34
end
35
+
36
+ def pretty_file ( file )
37
+ <<FILE
38
+ #{ file . path }
39
+ \t sha(r) #{ file . sha_repo . to_s } #{ file . mode_repo . to_s }
40
+ \t sha(i) #{ file . sha_index . to_s } #{ file . mode_index . to_s }
41
+ \t type #{ file . type . to_s }
42
+ \t stage #{ file . stage . to_s }
43
+ \t untrac #{ file . untracked . to_s }
44
+ FILE
45
+ end
41
46
42
47
# enumerable method
43
48
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ def set_file_paths
24
24
@wdir = create_temp_repo ( @wdir_dot )
25
25
end
26
26
27
- def teardown
27
+ teardown
28
+ def git_teardown
28
29
if @tmp_path
29
30
FileUtils . rm_r ( @tmp_path )
30
31
end
You can’t perform that action at this time.
0 commit comments