Skip to content

Commit c3b57dc

Browse files
bertwesargprati0100
authored andcommitted
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 <[email protected]> Signed-off-by: Pratyush Yadav <[email protected]>
1 parent 60c60b6 commit c3b57dc

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lib/diff.tcl

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -270,19 +270,6 @@ proc show_other_diff {path w m cont_info} {
270270
}
271271
}
272272

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-
286273
proc start_show_diff {cont_info {add_opts {}}} {
287274
global file_states file_lists
288275
global is_3way_diff is_submodule_diff diff_active repo_config
@@ -298,7 +285,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
298285
set is_submodule_diff 0
299286
set diff_active 1
300287
set current_diff_header {}
301-
set conflict_size [get_conflict_marker_size $path]
288+
set conflict_size [gitattr $path conflict-marker-size 7]
302289

303290
set cmd [list]
304291
if {$w eq $ui_index} {

0 commit comments

Comments
 (0)