Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
80983c4
git-gui: do not end the commit message with an empty line
j6t May 14, 2025
2f0f286
git-gui i18n: Updated Bulgarian translation (578t)
alshopov Jun 15, 2025
e8dd723
Merge branch 'ob/strip-comments-on-commit'
j6t Jun 21, 2025
0c8be6f
Merge branch 'ah/fix-open-with-stdin'
j6t Jul 8, 2025
b7ef407
Merge branch 'js/fix-open-exec'
j6t Jul 8, 2025
88125ff
Merge branch 'ml/replace-auto-execok'
j6t Jul 8, 2025
3f07230
Merge branch 'js/fix-open-exec-git'
j6t Jul 8, 2025
59a3998
gitk: Add support of SHA256 repositories
tiwai Jun 17, 2025
8f49975
gitk: require git >= 2.20
mark987 Jun 5, 2025
51c543c
gitk: remove code targeting git <= 1.7.2
mark987 Jun 5, 2025
82d316c
gitk: Make TclTk 8.6 the minimum, allow 8.7
mark987 Jul 13, 2025
b70227f
gitk: remove implementations for Tcl/Tk < 8.6
mark987 May 19, 2025
532a054
git-gui: Replace null_sha1 with nullid
tiwai Jul 16, 2025
dab92fe
git-gui: Add support of SHA256 repo
tiwai Jul 16, 2025
5b8103a
gitk: use $config_variables as list for save/restore
mark987 Jun 3, 2025
cb9fa4d
gitk: always use themed Tk (ttk)
mark987 Jun 8, 2025
9c3cc84
gitk: replace ${NS} with ttk
mark987 Jun 8, 2025
51bb2ab
gitk: remove non-ttk support code
mark987 Jun 8, 2025
3489ff1
gitk: separate x11 / win32 / aqua Mouse bindings
mark987 Jul 6, 2024
ec02983
gitk: wheel scrolling multiplier preference
mark987 Jun 3, 2025
429bbf4
gitk: mousewheel scrolling functions for Tk 8.6
mark987 Jun 6, 2025
61c74d0
gitk: update win32 scrolling for Tk 8.6 / TIP 171
mark987 Jul 6, 2024
82f0b92
gitk: update x11 scrolling for TclTk 8.6 / TIP 171
mark987 Jun 6, 2025
24fb77a
gitk: update aqua scrolling for TclTk 8.6 / TIP171
mark987 Jun 3, 2025
3e43143
gitk: allow horizontal commit-graph scrolling
mark987 May 27, 2025
8e34d8b
gitk: choosefont - remove a stray debugging line
j6t Jul 17, 2025
77f648e
git-gui: require git >= 2.36
mark987 Feb 13, 2024
ed73388
git-gui: Make TclTk 8.6 the minimum, allow 8.7
mark987 May 17, 2025
dd7eb2d
git-gui: git ls-files knows --exclude-standard
mark987 Apr 5, 2025
d342dcd
git-gui: git-diff-index always knows submodules
mark987 Apr 5, 2025
f87a36b
git-gui: use git-branch --show-current
mark987 Feb 12, 2024
182e2c4
git-gui: git rev-parse knows show_toplevel
mark987 Feb 13, 2024
e48c822
git-gui: git-blame understands -w and textconv
mark987 Feb 13, 2024
940640d
git-gui: git-diff knows submodules and textconv
mark987 Feb 13, 2024
e42ba88
git-gui: git merge understands --strategy=recursive
mark987 Feb 13, 2024
8b48034
git-gui: git-remote is always available
mark987 Feb 13, 2024
c855570
git-gui: use git_init to create new repository dir
mark987 Feb 9, 2024
c939344
git-gui: remove unused git-version
mark987 Feb 13, 2024
4e3369f
git-gui: remove unreachable Tk 8.4 code
mark987 Feb 16, 2024
13df401
git-gui: remove redundant check for Tk >= 8.5
mark987 Feb 18, 2024
ed7d2af
git-gui: always use themed widgets from ttk
mark987 May 21, 2025
fdc0e3a
git-gui: remove ${NS} indirection for ttk
mark987 Jul 14, 2025
aa1a3e0
gitk: sort by ref type on the 'tags and heads' view
rappazzo Jun 1, 2015
9abe70d
gitk: make 'sort-refs-by-type' optional and persistent
Jul 18, 2025
c0fb435
gitk: separate upstream refs when using the sort-by-type option
Jul 19, 2025
9b1c537
git-gui: remove non-ttk code
mark987 May 20, 2025
6ff8d68
git-gui: use git-clone
mark987 Feb 9, 2024
3ce650f
git-gui: default to full copy for linked worktrees
mark987 Jul 21, 2025
6dfdf7b
git-gui: use dashless 'git cmd' form for read/write
mark987 Apr 5, 2025
eaca720
git-gui: remove procs gitexec and _git_cmd
mark987 Apr 6, 2025
f4b7ad5
git-gui: eliminate _search_exe
mark987 Apr 5, 2025
594810d
Merge branch 'ml/tcl86'
j6t Jul 22, 2025
436dad0
Merge branch 'ml/abandon-old-versions'
j6t Jul 22, 2025
cf9d3c1
Merge branch 'ti/support-sha256'
j6t Jul 22, 2025
e2874c6
Merge branch 'mr/sort-refs-by-type'
j6t Jul 22, 2025
0f3d030
Merge branch 'ml/abandon-old-version' (early part)
j6t Jul 22, 2025
2d3f3f0
gitk: remove header of now empty section "General options"
j6t Jul 18, 2025
afea220
Merge branch 'master' of https://github.com/j6t/gitk
gitster Jul 22, 2025
0e8243a
Merge branch 'master' of https://github.com/j6t/git-gui
gitster Jul 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
407 changes: 94 additions & 313 deletions git-gui/git-gui.sh

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions git-gui/lib/about.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
proc do_about {} {
global appvers copyright oguilib
global tcl_patchLevel tk_patchLevel
global ui_comm_spell NS use_ttk
global ui_comm_spell

set w .about_dialog
Dialog $w
wm geometry $w "+[winfo rootx .]+[winfo rooty .]"

pack [git_logo $w.git_logo] -side left -fill y -padx 10 -pady 10
${NS}::label $w.header -text [mc "About %s" [appname]] \
ttk::label $w.header -text [mc "About %s" [appname]] \
-font font_uibold -anchor center
pack $w.header -side top -fill x

${NS}::frame $w.buttons
${NS}::button $w.buttons.close -text {Close} \
ttk::frame $w.buttons
ttk::button $w.buttons.close -text {Close} \
-default active \
-command [list destroy $w]
pack $w.buttons.close -side right
Expand Down Expand Up @@ -44,7 +44,7 @@ proc do_about {} {

set d {}
append d "git wrapper: $::_git\n"
append d "git exec dir: [gitexec]\n"
append d "git exec dir: [git --exec-path]\n"
append d "git-gui lib: $oguilib"

paddedlabel $w.vers -text $v
Expand Down
37 changes: 18 additions & 19 deletions git-gui/lib/blame.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ field tooltip_timer {} ; # Current timer event for our tooltip
field tooltip_commit {} ; # Commit(s) in tooltip

constructor new {i_commit i_path i_jump} {
global cursor_ptr M1B M1T have_tk85 use_ttk NS
global cursor_ptr M1B M1T
variable active_color
variable group_colors

Expand Down Expand Up @@ -203,18 +203,17 @@ constructor new {i_commit i_path i_jump} {
-width 80 \
-xscrollcommand [list $w.file_pane.out.sbx set] \
-font font_diff
if {$have_tk85} {
$w_file configure -inactiveselectbackground darkblue
}

$w_file tag conf found \
-background yellow

set w_columns [list $w_amov $w_asim $w_line $w_file]

${NS}::scrollbar $w.file_pane.out.sbx \
ttk::scrollbar $w.file_pane.out.sbx \
-orient h \
-command [list $w_file xview]
${NS}::scrollbar $w.file_pane.out.sby \
ttk::scrollbar $w.file_pane.out.sby \
-orient v \
-command [list scrollbar2many $w_columns yview]
eval grid $w_columns $w.file_pane.out.sby -sticky nsew
Expand Down Expand Up @@ -264,10 +263,10 @@ constructor new {i_commit i_path i_jump} {
-background $active_color \
-font font_ui
$w_cviewer tag raise sel
${NS}::scrollbar $w.file_pane.cm.sbx \
ttk::scrollbar $w.file_pane.cm.sbx \
-orient h \
-command [list $w_cviewer xview]
${NS}::scrollbar $w.file_pane.cm.sby \
ttk::scrollbar $w.file_pane.cm.sby \
-orient v \
-command [list $w_cviewer yview]
pack $w.file_pane.cm.sby -side right -fill y
Expand Down Expand Up @@ -426,6 +425,7 @@ method _kill {} {

method _load {jump} {
variable group_colors
global hashlength

_hide_tooltip $this

Expand All @@ -436,7 +436,7 @@ method _load {jump} {
$i conf -state normal
$i delete 0.0 end
foreach g [$i tag names] {
if {[regexp {^g[0-9a-f]{40}$} $g]} {
if {[regexp [string map "@@ $hashlength" {^g[0-9a-f]{@@}$}] $g]} {
$i tag delete $g
}
}
Expand Down Expand Up @@ -470,7 +470,7 @@ method _load {jump} {
$w_path conf -text [escape_path $path]

set do_textconv 0
if {![is_config_false gui.textconv] && [git-version >= 1.7.2]} {
if {![is_config_false gui.textconv]} {
set filter [gitattr $path diff set]
set textconv [get_config [join [list diff $filter textconv] .]]
if {$filter ne {set} && $textconv ne {}} {
Expand Down Expand Up @@ -500,6 +500,8 @@ method _load {jump} {
}

method _history_menu {} {
global hashlength

set m $w.backmenu
if {[winfo exists $m]} {
$m delete 0 end
Expand All @@ -513,7 +515,7 @@ method _history_menu {} {
set c [lindex $e 0]
set f [lindex $e 1]

if {[regexp {^[0-9a-f]{40}$} $c]} {
if {[regexp [string map "@@ $hashlength" {^[0-9a-f]{@@}$}] $c]} {
set t [string range $c 0 8]...
} elseif {$c eq {}} {
set t {Working Directory}
Expand Down Expand Up @@ -627,6 +629,7 @@ method _exec_blame {cur_w cur_d options cur_s} {
method _read_blame {fd cur_w cur_d} {
upvar #0 $cur_d line_data
variable group_colors
global hashlength nullid

if {$fd ne $current_fd} {
catch {close $fd}
Expand All @@ -635,7 +638,7 @@ method _read_blame {fd cur_w cur_d} {

$cur_w conf -state normal
while {[gets $fd line] >= 0} {
if {[regexp {^([a-z0-9]{40}) (\d+) (\d+) (\d+)$} $line line \
if {[regexp [string map "@@ $hashlength" {^([a-z0-9]{@@}) (\d+) (\d+) (\d+)$}] $line line \
cmit original_line final_line line_count]} {
set r_commit $cmit
set r_orig_line $original_line
Expand All @@ -648,7 +651,7 @@ method _read_blame {fd cur_w cur_d} {
set oln $r_orig_line
set cmit $r_commit

if {[regexp {^0{40}$} $cmit]} {
if {$cmit eq $nullid} {
set commit_abbr work
set commit_type curr_commit
} elseif {$cmit eq $commit} {
Expand Down Expand Up @@ -807,9 +810,7 @@ method _read_blame {fd cur_w cur_d} {
# thorough copy search; insert before the threshold
set original_options [linsert $original_options 0 -C]
}
if {[git-version >= 1.5.3]} {
lappend original_options -w ; # ignore indentation changes
}
lappend original_options -w ; # ignore indentation changes

_exec_blame $this $w_amov @amov_data \
$original_options \
Expand Down Expand Up @@ -857,9 +858,7 @@ method _fullcopyblame {} {
set threshold [get_config gui.copyblamethreshold]
set original_options [list -C -C "-C$threshold"]

if {[git-version >= 1.5.3]} {
lappend original_options -w ; # ignore indentation changes
}
lappend original_options -w ; # ignore indentation changes

# Find the line range
set pos @$::cursorX,$::cursorY
Expand Down Expand Up @@ -1298,7 +1297,7 @@ method _open_tooltip {cur_w} {
# On MacOS raising a window causes it to acquire focus.
# Tk 8.5 on MacOS seems to properly support wm transient,
# so we can safely counter the effect there.
if {$::have_tk85 && [is_MacOSX]} {
if {[is_MacOSX]} {
update
if {$w eq {}} {
raise .
Expand Down
15 changes: 7 additions & 8 deletions git-gui/lib/branch_checkout.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@ field opt_fetch 1; # refetch tracking branch if used?
field opt_detach 0; # force a detached head case?

constructor dialog {} {
global use_ttk NS
make_dialog top w
wm withdraw $w
wm title $top [mc "%s (%s): Checkout Branch" [appname] [reponame]]
if {$top ne {.}} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}

${NS}::label $w.header -text [mc "Checkout Branch"] \
ttk::label $w.header -text [mc "Checkout Branch"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x

${NS}::frame $w.buttons
${NS}::button $w.buttons.create -text [mc Checkout] \
ttk::frame $w.buttons
ttk::button $w.buttons.create -text [mc Checkout] \
-default active \
-command [cb _checkout]
pack $w.buttons.create -side right
${NS}::button $w.buttons.cancel -text [mc Cancel] \
ttk::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10
Expand All @@ -36,14 +35,14 @@ constructor dialog {} {
$w_rev bind_listbox <Double-Button-1> [cb _checkout]
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5

${NS}::labelframe $w.options -text [mc Options]
ttk::labelframe $w.options -text [mc Options]

${NS}::checkbutton $w.options.fetch \
ttk::checkbutton $w.options.fetch \
-text [mc "Fetch Tracking Branch"] \
-variable @opt_fetch
pack $w.options.fetch -anchor nw

${NS}::checkbutton $w.options.detach \
ttk::checkbutton $w.options.detach \
-text [mc "Detach From Local Branch"] \
-variable @opt_detach
pack $w.options.detach -anchor nw
Expand Down
36 changes: 17 additions & 19 deletions git-gui/lib/branch_create.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ field opt_fetch 1; # refetch tracking branch if used?
field reset_ok 0; # did the user agree to reset?

constructor dialog {} {
global repo_config use_ttk NS
global repo_config

make_dialog top w
wm withdraw $w
Expand All @@ -25,39 +25,37 @@ constructor dialog {} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}

${NS}::label $w.header -text [mc "Create New Branch"] \
ttk::label $w.header -text [mc "Create New Branch"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x

${NS}::frame $w.buttons
${NS}::button $w.buttons.create -text [mc Create] \
ttk::frame $w.buttons
ttk::button $w.buttons.create -text [mc Create] \
-default active \
-command [cb _create]
pack $w.buttons.create -side right
${NS}::button $w.buttons.cancel -text [mc Cancel] \
ttk::button $w.buttons.cancel -text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10

${NS}::labelframe $w.desc -text [mc "Branch Name"]
${NS}::radiobutton $w.desc.name_r \
ttk::labelframe $w.desc -text [mc "Branch Name"]
ttk::radiobutton $w.desc.name_r \
-text [mc "Name:"] \
-value user \
-variable @name_type
if {!$use_ttk} {$w.desc.name_r configure -anchor w}
set w_name $w.desc.name_t
${NS}::entry $w_name \
ttk::entry $w_name \
-width 40 \
-textvariable @name \
-validate key \
-validatecommand [cb _validate %d %S]
grid $w.desc.name_r $w_name -sticky we -padx {0 5}

${NS}::radiobutton $w.desc.match_r \
ttk::radiobutton $w.desc.match_r \
-text [mc "Match Tracking Branch Name"] \
-value match \
-variable @name_type
if {!$use_ttk} {$w.desc.match_r configure -anchor w}
grid $w.desc.match_r -sticky we -padx {0 5} -columnspan 2

grid columnconfigure $w.desc 1 -weight 1
Expand All @@ -66,34 +64,34 @@ constructor dialog {} {
set w_rev [::choose_rev::new $w.rev [mc "Starting Revision"]]
pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5

${NS}::labelframe $w.options -text [mc Options]
ttk::labelframe $w.options -text [mc Options]

${NS}::frame $w.options.merge
${NS}::label $w.options.merge.l -text [mc "Update Existing Branch:"]
ttk::frame $w.options.merge
ttk::label $w.options.merge.l -text [mc "Update Existing Branch:"]
pack $w.options.merge.l -side left
${NS}::radiobutton $w.options.merge.no \
ttk::radiobutton $w.options.merge.no \
-text [mc No] \
-value none \
-variable @opt_merge
pack $w.options.merge.no -side left
${NS}::radiobutton $w.options.merge.ff \
ttk::radiobutton $w.options.merge.ff \
-text [mc "Fast Forward Only"] \
-value ff \
-variable @opt_merge
pack $w.options.merge.ff -side left
${NS}::radiobutton $w.options.merge.reset \
ttk::radiobutton $w.options.merge.reset \
-text [mc Reset] \
-value reset \
-variable @opt_merge
pack $w.options.merge.reset -side left
pack $w.options.merge -anchor nw

${NS}::checkbutton $w.options.fetch \
ttk::checkbutton $w.options.fetch \
-text [mc "Fetch Tracking Branch"] \
-variable @opt_fetch
pack $w.options.fetch -anchor nw

${NS}::checkbutton $w.options.checkout \
ttk::checkbutton $w.options.checkout \
-text [mc "Checkout After Creation"] \
-variable @opt_checkout
pack $w.options.checkout -anchor nw
Expand Down
12 changes: 6 additions & 6 deletions git-gui/lib/branch_delete.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ field w_check ; # revision picker for merge test
field w_delete ; # delete button

constructor dialog {} {
global current_branch use_ttk NS
global current_branch

make_dialog top w
wm withdraw $w
Expand All @@ -18,25 +18,25 @@ constructor dialog {} {
wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
}

${NS}::label $w.header -text [mc "Delete Local Branch"] \
ttk::label $w.header -text [mc "Delete Local Branch"] \
-font font_uibold -anchor center
pack $w.header -side top -fill x

${NS}::frame $w.buttons
ttk::frame $w.buttons
set w_delete $w.buttons.delete
${NS}::button $w_delete \
ttk::button $w_delete \
-text [mc Delete] \
-default active \
-state disabled \
-command [cb _delete]
pack $w_delete -side right
${NS}::button $w.buttons.cancel \
ttk::button $w.buttons.cancel \
-text [mc Cancel] \
-command [list destroy $w]
pack $w.buttons.cancel -side right -padx 5
pack $w.buttons -side bottom -fill x -pady 10 -padx 10

${NS}::labelframe $w.list -text [mc "Local Branches"]
ttk::labelframe $w.list -text [mc "Local Branches"]
set w_heads $w.list.l
slistbox $w_heads \
-height 10 \
Expand Down
Loading