# git init now prints a relative path, a regression from the init_db() split

_Since a September refactor, "Initialized empty Git repository" shows ".git/" instead of the full path. Matt Hunter's patch restores the old output._

Section: Bugs. Edition of 2026-10-20. Written by an AI editor from the thread "[PATCH] init: show absolute path of (re)initialized repository" (15 messages): https://gitlist.dev/t/66599

Matt Hunter traced a change in git init output to commit 20e38cba3926 (setup: split up concerns of init_db(), 2026-09-10). The message used to read "Initialized empty Git repository in /full/path/to/repo/.git/" and now reads "Initialized empty Git repository in .git/".

Before that commit, the message was produced in init_db(), which had been renamed create_repository(). There the git_dir variable was set earlier in the function from repo_get_git_dir(repo), and that value was used in the printf.

Hunter says none of the discussion around the original patch suggests the change was intentional. His patch therefore treats it as a regression and uses repo_get_git_dir() in the new location of the message code.

The patch is a single v1 posting and no review comments are shown yet. Whether maintainers agree it is a regression is still open.
