* '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

@@ -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
@@ -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
@@ -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