Re: [PATCH 4/4] config: don't implicitly use gitdir
- From
Jeff King <peff@peff.net>
- Date
- Jun 13, 2017, 06:29 UTC
- Message-ID
- <20170613062941.r22r64y5ymdpfhbx@sigill.intra.peff.net>
- In-Reply-To
- <20170613055243.GI154599@google.com>
On Mon, Jun 12, 2017 at 10:52:43PM -0700, Brandon Williams wrote:
Show 10 quoted lines
> > >> curious: Why get_git_common_dir() instead of get_git_dir()?
> > >
> > > Needs to be commondir since the config is stored in the common git
> > > directory and not a per worktree git directory.
> >
> > *puzzled* Why wasn't this needed before, then? The rest of the patch
> > should result in no functional change, but this part seems different.
>
> there is no functional change, this is what always happened.
> git_path("config") will replace gitdir with commondir under the hood.Of the two callsites you removed, one is git_pathdup(), and the other is get_git_dir(). So they weren't matched, though I suspect the one in include_by_gitdir probably ought to have been commondir?
-Peff