Package: gitk
Version: 1:2.39.5-0+deb12u3
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,

Gitk allows selection of particular references to commence its commit
graph, overriding the default of just showing the current HEAD.

In the recent security update 1:2.39.5-0+deb12u3, this option is broken,
and specifing one of the following selection criteria in the View menu:

  "All local branches", "All Tags" or "All remote-tracking branches"

always results in an empty commit graph and the following error message:

  Error executing git log: can't read "revs": no such variable.

This worked as expected in previous Bookworm version 1:2.39.5-0+deb12u2
and appears to be OK in current Trixie 1:2.47.3-0+deb13u1.

The problem appears to be the added use of $revs in the following change
fragment, because there is a code path just a few lines above which
does not instantiate $revs.  This did not previously matter because,
in this function, $revs was not previously used outside the code path
which did instantiate it.

--- a/gitk-deb12u2  2025-01-11 19:46:03.000000000 +0000
+++ b/gitk-deb12u3  2025-10-07 13:22:08.000000000 +0100
@@ -411,8 +497,9 @@
     }
 
     if {[catch {
-        set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \
-                        --parents --boundary $args "--" $files] r]
+        set fd [safe_open_command_redirect [concat git log --no-color -z 
--pretty=raw $show_notes \
+                        --parents --boundary $args --stdin] \
+                        [list "<<[join [concat $revs "--" $vfilelimit($view)] 
"\n"]"]]
     } err]} {
         error_popup "[mc "Error executing git log:"] $err"
         return 0


I believe that the following change may fix the problem by simply
instantiating the variable in the path which doesn't do so.  This is
the approach which seems to have been taken in the Trixie version of
the change, though I'm not well up in either Tcl/Tk or the detailed
possibilities of the gitk View option so I am not 100% sure of the intent
of the added line above.

I'd be grateful therefore if you could review this potential patch, as
it may be that the actual problem is something else in the above change
and there may be a solution which better fits with the intent.

--- a/gitk-deb12u3  2025-10-07 13:22:08.000000000 +0100
+++ b/gitk-deb12u3.try      2026-01-14 21:30:36.164516228 +0000
@@ -493,6 +493,7 @@
         }
         set args [concat $vflags($view) $revs]
     } else {
+        set revs {}
         set args $vorigargs($view)
     }
 
Thankyou,

Nick Leverton

-- System Information:
Debian Release: 12.13
  APT prefers oldstable-updates
  APT policy: (610, 'oldstable-updates'), (610, 'oldstable-security'), (610, 
'oldstable-debug'), (610, 'oldstable'), (600, 'oldoldstable-updates'), (600, 
'oldoldstable-security'), (600, 'oldoldstable-debug'), (600, 'oldoldstable'), 
(590, 'oldoldstable-updates'), (590, 'oldoldstable'), (110, 'unstable'), (62, 
'stable-updates'), (62, 'stable-security'), (62, 'stable-debug'), (62, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-41-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gitk depends on:
ii  git  1:2.39.5-0+deb12u3
ii  tk   8.6.13

gitk recommends no packages.

Versions of packages gitk suggests:
pn  git-doc  <none>

-- no debconf information

Reply via email to