git-gui: use existing interface to query a path's attribute

Replace the hand-coded call to git check-attr with the already provided one. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>

Bert Wesarg committed Sep 30, 2019 at 21:54 UTC c3b57dc2a0fe944b3c6c9c11b4ce0700c77f190c
1 file changed +1 -14
lib/diff.tcl
+1 -14
@@ -270,19 +270,6 @@ proc show_other_diff {path w m cont_info} {
270 }
271 }
272
273 -proc get_conflict_marker_size {path} {
274 - set size 7
275 - catch {
276 - set fd_rc [eval [list git_read check-attr "conflict-marker-size" -- $path]]
277 - set ret [gets $fd_rc line]
278 - close $fd_rc
279 - if {$ret > 0} {
280 - regexp {.*: conflict-marker-size: (\d+)$} $line line size
281 - }
282 - }
283 - return $size
284 -}
285 -
273 proc start_show_diff {cont_info {add_opts {}}} {
274 global file_states file_lists
275 global is_3way_diff is_submodule_diff diff_active repo_config
@@ -298,7 +285,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
285 set is_submodule_diff 0
286 set diff_active 1
287 set current_diff_header {}
301 - set conflict_size [get_conflict_marker_size $path]
288 + set conflict_size [gitattr $path conflict-marker-size 7]
289
290 set cmd [list]
291 if {$w eq $ui_index} {