On Wed, Sep 11, 2024 at 02:12:51PM -0700, karthik nayak wrote: > Patrick Steinhardt <ps@xxxxxx> writes: > > [snip] > > > diff --git a/repository.c b/repository.c > > index 9825a308993..6f43f2e8344 100644 > > --- a/repository.c > > +++ b/repository.c > > @@ -91,6 +91,13 @@ static void expand_base_dir(char **out, const char *in, > > *out = xstrfmt("%s/%s", base_dir, def_in); > > } > > > > +const char *repo_get_git_dir(struct repository *repo) > > +{ > > + if (!repo->gitdir) > > + BUG("git environment hasn't been setup"); > > Shouldn't this message be more generic now? Since this function can be > used with any repository? Good point indeed. I was initially worried that changing it may alter user-visible behaviour. But in theory, calls to `BUG()` should be unreachable and thus never be encountered in the wild. Patrick