Re: [PATCH 4/9] read_early_config(): optionally return the worktree's top-level directory
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 8, 2017, 18:52 UTC
- Message-ID
- <alpine.DEB.2.21.1.1706082052040.171564@virtualbox>
- In-Reply-To
- <20170608163230.GK110638@google.com>
Hi Brandon,
On Thu, 8 Jun 2017, Brandon Williams wrote:
Show 28 quoted lines
> On 06/08, Johannes Schindelin wrote: > > > > On Thu, 8 Jun 2017, Brandon Williams wrote: > > > > > On 06/08, Johannes Schindelin wrote: > > > > > > > Back to the worktree_dir variable. > > > > > > > > I think part of the confusion here is that it may be left alone even > > > > when there is a worktree. For example, if we are already in the > > > > top-level directory. Or if the worktree somehow points to a different > > > > directory than the one containing the .git/ directory. > > > > > > > > Therefore, I renamed this variable to `cdup_dir` to reflect the fact > > > > that it is only touched if Git determines that it is in a subdirectory > > > > of the directory containing the .git/ directory. > > > > > > Ok, maybe I'm just not following but just from reading the variable name > > > I can't really understand what 'cdup_dir' means. > > > > My idea would be that this is in line with the > > > > git rev-parse --show-cdup > > > > incantation. > > Ah ok, 'cdup' just doesn't really mean much to me. Is it supposed to > stand for something?
Yes, it stands for "change directory up", as in `cd ../../`. ;-)
Ciao, Dscho