Re: [PATCH v4 04/15] scalar: 'register' sets recommended config and starts maintenance
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 6, 2021, 20:38 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2110062233180.395@tvgsbejvaqbjf.bet>
- In-Reply-To
- <CABPp-BGLcLKk1QLHtb6KpCOpn=M1-wwK6KD91rLCYbh6n5gTYA@mail.gmail.com>
Hi Elijah,
On Mon, 27 Sep 2021, Elijah Newren wrote:
Show 17 quoted lines
> Sorry, one more thing...
>
> On Tue, Sep 14, 2021 at 7:39 AM Derrick Stolee via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> ...
> > + /* check if currently in enlistment root with src/ workdir */
> > + strbuf_addstr(&path, "/src/.git");
> > + if (is_git_directory(path.buf)) {
>
> ...and...
>
> > + /* check if currently in workdir */
> > + strbuf_addstr(&path, "/.git");
> > + if (is_git_directory(path.buf)) {
>
> Do these two checks suggest that only a primary worktree can be
> enlisted with scalar? (Is git-worktree generally incompatible?)Good point! I think we'll need to use `is_nonbare_repository_dir()` instead.
This also has the additional benefit of doing away with quite a bit of `/.git` appending and undoing it. I.e. it simplifies the code dramatically.
Ciao, Dscho