{"thread":{"id":"64484","subject":"Ref list fails to load in gitk when stale tracking reference exists","startedAt":"2025-11-15T12:33:49Z","lastAt":"2025-11-15T22:06:54Z","messageCount":3,"participants":["BhaaL","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"530734","messageId":"CAJESqkrv9RmimXn+6SUhRhih3qEsp_MQk0+BH2FZsFX-_uD1oA@mail.gmail.com","threadId":"64484","inReplyTo":null,"subject":"Ref list fails to load in gitk when stale tracking reference exists","fromName":"BhaaL","fromEmail":"bhaalsen@gmail.com","sentAt":"2025-11-15T12:33:36Z","receivedAt":"2025-11-15T12:33:49Z","isPatch":false,"sender":{"key":"bhaalsen@gmail.com","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\nOpen gitk and use F2 to list refs while remote-merged branch is in view\nthat still exists locally (and has a tracking reference in .git/config).\n\nWhat did you expect to happen? (Expected behavior)\nThe list of refs opens, so I can see reachable tags.\n\nWhat happened instead? (Actual behavior)\nAn error pops up, dismissing it leaves the list of refs empty.\n\nWhat's different between what you expected and what actually happened?\nThis error message:\n---------\ncan't read \"headids(remotes/origin/testing)\": no such element in array\ncan't read \"headids(remotes/origin/testing)\": no such element in array\n    while executing\n\"commitinview $headids($upstreamofref($n)) $curview\"\n    (procedure \"refill_reflist\" line 16)\n    invoked from within\n\"refill_reflist\"\n    (procedure \"showrefs\" line 44)\n    invoked from within\n\"showrefs\"\n    (command bound to event)\n---------\n\nremotes/origin/testing is a branch that existed upstream, but was\nsince merged and deleted.\nThe local one still exists (pending deletion/cleanup), but has a\ntracking reference\nin .git/config:\n---------\n[branch \"testing\"]\n    remote = origin\n    rebase = true\n    merge = refs/heads/testing\n---------\n\nAnything else you want to add:\nThis wasn't the case with an earlier version of Git on a decommissioned machine.\ngit version 2.42.0.windows.2 is known good (but 2 years old).\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.51.0.windows.1\ncpu: x86_64\nbuilt from commit: 4d21a77b98af5cf479d8b6f863c2aa94257cd4e1\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: D:/git-sdk-64-build-installers/usr/bin/sh\nfeature: fsmonitor--daemon\nlibcurl: 8.15.0\nOpenSSL: OpenSSL 3.2.4 11 Feb 2025\nzlib: 1.3.1\nSHA-1: SHA1_DC\nSHA-256: SHA256_BLK\ndefault-ref-format: files\ndefault-hash: sha1\nuname: Windows 10.0 26100\ncompiler info: gnuc: 15.2\nlibc info: no libc information available\n$SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n\n\n[Enabled Hooks]\n"},{"id":"530762","messageId":"c70c4605-8c14-46b1-89c4-736165432d07@kdbg.org","threadId":"64484","inReplyTo":"CAJESqkrv9RmimXn+6SUhRhih3qEsp_MQk0+BH2FZsFX-_uD1oA@mail.gmail.com","subject":"Re: Ref list fails to load in gitk when stale tracking reference exists","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2025-11-15T22:01:16Z","receivedAt":"2025-11-15T22:01:27Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 15.11.25 um 13:33 schrieb BhaaL:\n> This error message:\n> ---------\n> can't read \"headids(remotes/origin/testing)\": no such element in array\n> can't read \"headids(remotes/origin/testing)\": no such element in array\n>     while executing\n> \"commitinview $headids($upstreamofref($n)) $curview\"\n>     (procedure \"refill_reflist\" line 16)\n>     invoked from within\n> \"refill_reflist\"\n>     (procedure \"showrefs\" line 44)\n>     invoked from within\n> \"showrefs\"\n>     (command bound to event)\n> ---------\n> \n> remotes/origin/testing is a branch that existed upstream, but was\n> since merged and deleted.\n> The local one still exists (pending deletion/cleanup), but has a\n> tracking reference\n> in .git/config:\n\nThis is fixed in the gitk that is included in Git v2.52.0.\n\n-- Hannes\n\n"},{"id":"530763","messageId":"CAJESqkrfjhSXmEc54JjX1bctG7JC2CtJF5KbUzPn4yat=FJ=7Q@mail.gmail.com","threadId":"64484","inReplyTo":"c70c4605-8c14-46b1-89c4-736165432d07@kdbg.org","subject":"Re: Ref list fails to load in gitk when stale tracking reference exists","fromName":"BhaaL","fromEmail":"bhaalsen@gmail.com","sentAt":"2025-11-15T22:06:42Z","receivedAt":"2025-11-15T22:06:54Z","isPatch":false,"sender":{"key":"bhaalsen@gmail.com","avatar":null},"body":"Awesome, thanks for letting me know!\nI've sat on this report for a while, and only just gotten to send it\noff (after an update to 2.51.2 still had the issue).\n- BhaaL\n\nOn Sat, Nov 15, 2025 at 11:01 PM Johannes Sixt <j6t@kdbg.org> wrote:\n>\n> Am 15.11.25 um 13:33 schrieb BhaaL:\n> > This error message:\n> > ---------\n> > can't read \"headids(remotes/origin/testing)\": no such element in array\n> > can't read \"headids(remotes/origin/testing)\": no such element in array\n> >     while executing\n> > \"commitinview $headids($upstreamofref($n)) $curview\"\n> >     (procedure \"refill_reflist\" line 16)\n> >     invoked from within\n> > \"refill_reflist\"\n> >     (procedure \"showrefs\" line 44)\n> >     invoked from within\n> > \"showrefs\"\n> >     (command bound to event)\n> > ---------\n> >\n> > remotes/origin/testing is a branch that existed upstream, but was\n> > since merged and deleted.\n> > The local one still exists (pending deletion/cleanup), but has a\n> > tracking reference\n> > in .git/config:\n>\n> This is fixed in the gitk that is included in Git v2.52.0.\n>\n> -- Hannes\n>\n"}]}