@@ -361,7 +361,7 @@ proc unmerged_files {files} {
361
361
proc parseviewargs {n arglist} {
362
362
global vdatemode vmergeonly vflags vdflags vrevs vfiltered vorigargs env
363
363
global vinlinediff
364
- global worddiff git_version
364
+ global worddiff
365
365
366
366
set vdatemode($n ) 0
367
367
set vmergeonly($n ) 0
@@ -412,14 +412,10 @@ proc parseviewargs {n arglist} {
412
412
" --color-words*" - " --word-diff=color" {
413
413
# These trigger a word diff in the console interface,
414
414
# so help the user by enabling our own support
415
- if {[ package vcompare $git_version " 1.7.2" ] >= 0} {
416
- set worddiff [ mc " Color words" ]
417
- }
415
+ set worddiff [ mc " Color words" ]
418
416
}
419
417
" --word-diff*" {
420
- if {[ package vcompare $git_version " 1.7.2" ] >= 0} {
421
- set worddiff [ mc " Markup words" ]
422
- }
418
+ set worddiff [ mc " Markup words" ]
423
419
}
424
420
" --stat=*" - " --numstat" - " --shortstat" - " --summary" -
425
421
" --check" - " --exit-code" - " --quiet" - " --topo-order" -
@@ -567,7 +563,6 @@ proc start_rev_list {view} {
567
563
global viewactive viewinstances vmergeonly
568
564
global mainheadid viewmainheadid viewmainheadid_orig
569
565
global vcanopt vflags vrevs vorigargs
570
- global show_notes
571
566
572
567
set startmsecs [ clock clicks -milliseconds]
573
568
set commitidx($view ) 0
@@ -617,7 +612,7 @@ proc start_rev_list {view} {
617
612
}
618
613
619
614
if {[ catch {
620
- set fd [safe_open_command_redirect [concat git log --no-color -z --pretty=raw $show_notes \
615
+ set fd [safe_open_command_redirect [concat git log --no-color -z --pretty=raw --show-notes \
621
616
--parents --boundary $args --stdin] \
622
617
[ list " <<[ join [concat $revs " --" $files ] " \n " ]" ] ]
623
618
} err]} {
@@ -713,7 +708,6 @@ proc updatecommits {} {
713
708
global mainheadid viewmainheadid viewmainheadid_orig pending_select
714
709
global hasworktree
715
710
global varcid vposids vnegids vflags vrevs
716
- global show_notes
717
711
718
712
set hasworktree [ hasworktree]
719
713
rereadrefs
@@ -770,7 +764,7 @@ proc updatecommits {} {
770
764
set args $vorigargs($view)
771
765
}
772
766
if {[ catch {
773
- set fd [safe_open_command_redirect [concat git log --no-color -z --pretty=raw $show_notes \
767
+ set fd [safe_open_command_redirect [concat git log --no-color -z --pretty=raw --show-notes \
774
768
--parents --boundary $args --stdin] \
775
769
[ list " <<[ join [concat $revs " --" $vfilelimit($view) ] " \n " ]" ] ]
776
770
} err]} {
@@ -2296,7 +2290,6 @@ proc makewindow {} {
2296
2290
global fprogitem fprogcoord lastprogupdate progupdatepending
2297
2291
global rprogitem rprogcoord rownumsel numcommits
2298
2292
global have_tk85 have_tk86 use_ttk NS
2299
- global git_version
2300
2293
global worddiff
2301
2294
2302
2295
# The " mc" arguments here are purely so that xgettext
@@ -2617,12 +2610,10 @@ proc makewindow {} {
2617
2610
pack .bleft.mid.ignspace -side left -padx 5
2618
2611
2619
2612
set worddiff [ mc " Line diff" ]
2620
- if {[ package vcompare $git_version " 1.7.2" ] >= 0} {
2621
- makedroplist .bleft.mid.worddiff worddiff [ mc " Line diff" ] \
2622
- [ mc " Markup words" ] [ mc " Color words" ]
2623
- trace add variable worddiff write changeworddiff
2624
- pack .bleft.mid.worddiff -side left -padx 5
2625
- }
2613
+ makedroplist .bleft.mid.worddiff worddiff [ mc " Line diff" ] \
2614
+ [ mc " Markup words" ] [ mc " Color words" ]
2615
+ trace add variable worddiff write changeworddiff
2616
+ pack .bleft.mid.worddiff -side left -padx 5
2626
2617
2627
2618
set ctext .bleft.bottom.ctext
2628
2619
text $ctext -background $bgcolor -foreground $fgcolor \
@@ -5539,15 +5530,11 @@ proc dohidelocalchanges {} {
5539
5530
# spawn off a process to do git diff-index --cached HEAD
5540
5531
proc dodiffindex {} {
5541
5532
global lserial showlocalchanges vfilelimit curview
5542
- global hasworktree git_version
5533
+ global hasworktree
5543
5534
5544
5535
if {!$showlocalchanges || !$hasworktree } return
5545
5536
incr lserial
5546
- if {[ package vcompare $git_version " 1.7.2" ] >= 0} {
5547
- set cmd " git diff-index --cached --ignore-submodules=dirty HEAD"
5548
- } else {
5549
- set cmd " git diff-index --cached HEAD"
5550
- }
5537
+ set cmd " git diff-index --cached --ignore-submodules=dirty HEAD"
5551
5538
if {$vfilelimit($curview) ne {}} {
5552
5539
set cmd [ concat $cmd -- $vfilelimit($curview) ]
5553
5540
}
@@ -8095,7 +8082,7 @@ proc addtocflist {ids} {
8095
8082
}
8096
8083
8097
8084
proc diffcmd {ids flags} {
8098
- global log_showroot nullid nullid2 git_version
8085
+ global log_showroot nullid nullid2
8099
8086
8100
8087
set i [ lsearch -exact $ids $nullid ]
8101
8088
set j [ lsearch -exact $ids $nullid2 ]
@@ -8116,9 +8103,7 @@ proc diffcmd {ids flags} {
8116
8103
}
8117
8104
}
8118
8105
} elseif {$j >= 0} {
8119
- if {[ package vcompare $git_version " 1.7.2" ] >= 0} {
8120
- set flags " $flags --ignore-submodules=dirty"
8121
- }
8106
+ set flags " $flags --ignore-submodules=dirty"
8122
8107
set cmd [ concat git diff-index --cached $flags ]
8123
8108
if {[ llength $ids ] > 1} {
8124
8109
# comparing index with specific revision
@@ -8247,17 +8232,8 @@ proc getblobdiffs {ids} {
8247
8232
global ignorespace
8248
8233
global worddiff
8249
8234
global limitdiffs vfilelimit curview
8250
- global git_version
8251
8235
8252
- set textconv {}
8253
- if {[ package vcompare $git_version " 1.6.1" ] >= 0} {
8254
- set textconv " --textconv"
8255
- }
8256
- set submodule {}
8257
- if {[ package vcompare $git_version " 1.6.6" ] >= 0} {
8258
- set submodule " --submodule"
8259
- }
8260
- set cmd [ diffcmd $ids " -p $textconv $submodule -C --cc --no-commit-id -U$diffcontext " ]
8236
+ set cmd [ diffcmd $ids " -p --textconv --submodule -C --cc --no-commit-id -U$diffcontext " ]
8261
8237
if {$ignorespace } {
8262
8238
append cmd " -w"
8263
8239
}
@@ -12836,11 +12812,6 @@ if {$use_ttk} {
12836
12812
setttkstyle
12837
12813
}
12838
12814
12839
- set show_notes {}
12840
- if {[ package vcompare $git_version " 1.6.6.2" ] >= 0} {
12841
- set show_notes " --show-notes"
12842
- }
12843
-
12844
12815
set appname " gitk"
12845
12816
12846
12817
set runq {}
0 commit comments