# [BUG] git instaweb hanging on very large workdirs with `status.showUntrackedFiles no`

1 messages from 2024-05-26 to 2024-05-26. Participants: Florian Meißner.
Thread: https://gitlist.dev/t/61548

## Florian Meißner, 2024-05-26 10:07

Subject: [BUG] git instaweb hanging on very large workdirs with `status.showUntrackedFiles no`
Message-ID: <73554ec7-4080-494f-8e2b-3e70acb48f93@mailbox.org>
URL: https://gitlist.dev/e/73554ec7-4080-494f-8e2b-3e70acb48f93%40mailbox.org

```
# What did you do before the bug happened? (Steps to reproduce your issue)

I manage my dotfiles with a bare repo, an alias and `git config 
status.showUntrackedFiles no` (see 
https://news.ycombinator.com/item?id=11071754).

# What did you expect to happen? (Expected behavior)

Git instaweb just showing the commits and tree, optimally without 
untracked files (respecting status.showUntrackedFiles).

# What happened instead? (Actual behavior)

When I try to run `git instaweb` on that repo, the website doesn't load 
but the git-instaweb process goes to 100% CPU (single-core) and stays 
there. From looking at `lsof` I conclude that instaweb somehow tries to 
look at every file in my workdir, taking forever (as my home folder) is 
very big. This renders gitweb/instaweb unusable for this type of repo.

# What's different between what you expected and what actually happened?

Gitweb loading instantly vs. taking minutes / not loading at all.

# Anything else you want to add:

I glanced over `man gitweb.conf` but couldn't find any useful parameters.

`git config --list` (redacted):
ˋˋˋ
user.email=…
user.name=…
init.defaultbranch=development
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
core.editor=nano
maintenance.repo=…
push.autosetupremote=true
includeif.gitdir:/run/media/…/.path=config.no_compress
core.repositoryformatversion=0
core.filemode=true
core.bare=true
status.showuntrackedfiles=no
remote.origin.url=git@…
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.development.remote=origin
branch.development.merge=refs/heads/development
ˋˋˋ

[System Info]
git version:
git version 2.45.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.8.10-2-MANJARO #1 SMP PREEMPT_DYNAMIC Thu May 23 19:12:51 
UTC 2024 x86_64
compiler info: gnuc: 14.1
libc info: glibc: 2.39
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]



```
