* 'master' of https://github.com/j6t/git-gui: (26 commits)
  git-gui: eliminate _search_exe
  git-gui: remove procs gitexec and _git_cmd
  git-gui: use dashless 'git cmd' form for read/write
  git-gui: default to full copy for linked worktrees
  git-gui: use git-clone
  git-gui: remove non-ttk code
  git-gui: remove ${NS} indirection for ttk
  git-gui: always use themed widgets from ttk
  git-gui: remove redundant check for Tk >= 8.5
  git-gui: remove unreachable Tk 8.4 code
  git-gui: remove unused git-version
  git-gui: use git_init to create new repository dir
  git-gui: git-remote is always available
  git-gui: git merge understands --strategy=recursive
  git-gui: git-diff knows submodules and textconv
  git-gui: git-blame understands -w and textconv
  git-gui: git rev-parse knows show_toplevel
  git-gui: use git-branch --show-current
  git-gui: git-diff-index always knows submodules
  git-gui: git ls-files knows --exclude-standard
  ...
This commit is contained in:
Junio C Hamano
2025-07-22 13:30:52 -07:00
32 changed files with 2055 additions and 2845 deletions

View File

@@ -2,15 +2,13 @@
# Copyright (C) 2006, 2007 Shawn Pearce
proc apply_tab_size {{firsttab {}}} {
global have_tk85 repo_config ui_diff
global repo_config ui_diff
set w [font measure font_diff "0"]
if {$have_tk85 && $firsttab != 0} {
if {$firsttab != 0} {
$ui_diff configure -tabs [list [expr {$firsttab * $w}] [expr {($firsttab + $repo_config(gui.tabsize)) * $w}]]
} elseif {$have_tk85 || $repo_config(gui.tabsize) != 8} {
$ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
} else {
$ui_diff configure -tabs {}
$ui_diff configure -tabs [expr {$repo_config(gui.tabsize) * $w}]
}
}
@@ -280,9 +278,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
if {$w eq $ui_index} {
lappend cmd diff-index
lappend cmd --cached
if {[git-version >= "1.7.2"]} {
lappend cmd --ignore-submodules=dirty
}
lappend cmd --ignore-submodules=dirty
} elseif {$w eq $ui_workdir} {
if {[string first {U} $m] >= 0} {
lappend cmd diff
@@ -290,17 +286,14 @@ proc start_show_diff {cont_info {add_opts {}}} {
lappend cmd diff-files
}
}
if {![is_config_false gui.textconv] && [git-version >= 1.6.1]} {
if {![is_config_false gui.textconv]} {
lappend cmd --textconv
}
if {[string match {160000 *} [lindex $s 2]]
|| [string match {160000 *} [lindex $s 3]]} {
set is_submodule_diff 1
if {[git-version >= "1.6.6"]} {
lappend cmd --submodule
}
lappend cmd --submodule
}
lappend cmd -p
@@ -319,14 +312,6 @@ proc start_show_diff {cont_info {add_opts {}}} {
lappend cmd $path
}
if {$is_submodule_diff && [git-version < "1.6.6"]} {
if {$w eq $ui_index} {
set cmd [list submodule summary --cached -- $path]
} else {
set cmd [list submodule summary --files -- $path]
}
}
if {[catch {set fd [git_read_nice $cmd]} err]} {
set diff_active 0
unlock_index