summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBert Wesarg <bert.wesarg@googlemail.com>2019-09-30 21:54:52 +0200
committerPratyush Yadav <me@yadavpratyush.com>2019-10-03 05:00:04 +0530
commitc3b57dc2a0fe944b3c6c9c11b4ce0700c77f190c (patch)
tree1656cffaf7e0af25d0ffbba2c4236313a0032000
parentMerge branch 'py/git-git-extra-stuff' (diff)
downloadgit-c3b57dc2a0fe944b3c6c9c11b4ce0700c77f190c.tar.xz
git-c3b57dc2a0fe944b3c6c9c11b4ce0700c77f190c.zip
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>
-rw-r--r--lib/diff.tcl15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 958a0fa2191..0fd46003b2f 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -270,19 +270,6 @@ proc show_other_diff {path w m cont_info} {
}
}
-proc get_conflict_marker_size {path} {
- set size 7
- catch {
- set fd_rc [eval [list git_read check-attr "conflict-marker-size" -- $path]]
- set ret [gets $fd_rc line]
- close $fd_rc
- if {$ret > 0} {
- regexp {.*: conflict-marker-size: (\d+)$} $line line size
- }
- }
- return $size
-}
-
proc start_show_diff {cont_info {add_opts {}}} {
global file_states file_lists
global is_3way_diff is_submodule_diff diff_active repo_config
@@ -298,7 +285,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
set is_submodule_diff 0
set diff_active 1
set current_diff_header {}
- set conflict_size [get_conflict_marker_size $path]
+ set conflict_size [gitattr $path conflict-marker-size 7]
set cmd [list]
if {$w eq $ui_index} {