{"thread":{"id":"61548","subject":"[BUG] git instaweb hanging on very large workdirs with `status.showUntrackedFiles no`","startedAt":"2024-05-26T10:07:30Z","lastAt":"2024-05-26T10:07:30Z","messageCount":1,"participants":["Florian Meißner"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"495652","messageId":"73554ec7-4080-494f-8e2b-3e70acb48f93@mailbox.org","threadId":"61548","inReplyTo":null,"subject":"[BUG] git instaweb hanging on very large workdirs with `status.showUntrackedFiles no`","fromName":"Florian Meißner","fromEmail":"aspiring_sociopath@mailbox.org","sentAt":"2024-05-26T10:07:20Z","receivedAt":"2024-05-26T10:07:30Z","isPatch":false,"sender":{"key":"aspiring_sociopath@mailbox.org","avatar":null},"body":"# What did you do before the bug happened? (Steps to reproduce your issue)\n\nI manage my dotfiles with a bare repo, an alias and `git config \nstatus.showUntrackedFiles no` (see \nhttps://news.ycombinator.com/item?id=11071754).\n\n# What did you expect to happen? (Expected behavior)\n\nGit instaweb just showing the commits and tree, optimally without \nuntracked files (respecting status.showUntrackedFiles).\n\n# What happened instead? (Actual behavior)\n\nWhen I try to run `git instaweb` on that repo, the website doesn't load \nbut the git-instaweb process goes to 100% CPU (single-core) and stays \nthere. From looking at `lsof` I conclude that instaweb somehow tries to \nlook at every file in my workdir, taking forever (as my home folder) is \nvery big. This renders gitweb/instaweb unusable for this type of repo.\n\n# What's different between what you expected and what actually happened?\n\nGitweb loading instantly vs. taking minutes / not loading at all.\n\n# Anything else you want to add:\n\nI glanced over `man gitweb.conf` but couldn't find any useful parameters.\n\n`git config --list` (redacted):\n```\nuser.email=…\nuser.name=…\ninit.defaultbranch=development\nfilter.lfs.clean=git-lfs clean -- %f\nfilter.lfs.smudge=git-lfs smudge -- %f\nfilter.lfs.process=git-lfs filter-process\nfilter.lfs.required=true\ncore.editor=nano\nmaintenance.repo=…\npush.autosetupremote=true\nincludeif.gitdir:/run/media/…/.path=config.no_compress\ncore.repositoryformatversion=0\ncore.filemode=true\ncore.bare=true\nstatus.showuntrackedfiles=no\nremote.origin.url=git@…\nremote.origin.fetch=+refs/heads/*:refs/remotes/origin/*\nbranch.development.remote=origin\nbranch.development.merge=refs/heads/development\n```\n\n[System Info]\ngit version:\ngit version 2.45.1\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 6.8.10-2-MANJARO #1 SMP PREEMPT_DYNAMIC Thu May 23 19:12:51 \nUTC 2024 x86_64\ncompiler info: gnuc: 14.1\nlibc info: glibc: 2.39\n$SHELL (typically, interactive shell): /bin/bash\n\n\n[Enabled Hooks]\n\n\n"}]}