Skip to content

Commit

Permalink
git: Add patch for git-gui and our Tcl/Tk version
Browse files Browse the repository at this point in the history
Copy the commit description.

```
[PATCH] git-gui: Correctly detect Tkk feature

Since git 2.12.2, running `git gui` in a git checkout fails with the error
below [1].

> Error in startup script: wrong # args: should be "ttk::style theme use theme"
>      while executing
> "ttk::style theme use"
>      (procedure "ttext" line 4)
>      invoked from within
> "ttext $ui_workdir -background white -foreground black \
>          -borderwidth 0 \
>          -width 20 -height 10 \
>          -wrap none \
>          -takefocus 1 -highlightthickness 1\
>          ..."
>      (file "/usr/libexec/git-core/git-gui" line 3190)

Konstantin Khomoutov explains the issue and the fix [2].

> The git-gui relies on the [ttk::style theme use] command --
> that is, the two-argument invocation of [ttk::style] -- to return
> the theme being currently in use, and this feature was implemented
> on 2008-05-27 [1] by Pat Thoyts.
>
> Judging from the output of
>
>   fossil descendants e83b7dd29ddae998f96538584afb518849ac1e2c
>
> the first Tk release to have this change was 8.6b2.
>
> So the proper fix appears to be more involved:
>
>  set default_config(gui.usettk) \
>    [expr {[package vcompare [info patchlevel] 8.6b2] >= 0}]
>
> (The slash+newline sequence is not needed -- it's here mostly
> for pretty-printing.)
>
> 1. http://core.tcl.tk/tk/info/e83b7dd29ddae998

[1] https://public-inbox.org/git/1490906641.2546.1.camel@kaarsemaker.net/T/
[2] https://public-inbox.org/git/20170331173435.c822389c9fc7ebe15c20ed00@domain007.com/
```

Fixes: #444 (git: `git gui` does not start anymore)
  • Loading branch information
pmenzel committed Aug 3, 2017
1 parent 68255af commit 4b72781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git.be0
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SRCURL[0]="https://www.kernel.org/pub/software/scm/git/git-${PKGVERSION}.tar.xz"
## Add URLs/pathes to patch files to the PATCHURL array.
## The sources will be patched in the order of the array.

# PATCHURL+=()
PATCHURL+=(/src/mariux/patches/0001-git-gui-Correctly-detect-Tkk-feature.patch)

###############################################################################
## Add filename patterns to the EXCLUDE array of files that should not
Expand Down

0 comments on commit 4b72781

Please sign in to comment.