Re: [PATCH v3] nmbug: Add an 'init' command

Subject: Re: [PATCH v3] nmbug: Add an 'init' command

Date: Sat, 29 Nov 2014 12:18:29 -0800

To: Michal Sojka

Cc: notmuch@notmuchmail.org

From: W. Trevor King


On Sat, Nov 29, 2014 at 12:09:17PM -0800, W. Trevor King wrote:
> On Sat, Nov 29, 2014 at 10:40:01AM +0100, Michal Sojka wrote:
> > On Út, říj 28 2014, W. Trevor King wrote:
> > > +        _spawn(
> > > +            args=['git', 'init', '--separate-git-dir', NMBGIT, workdir],
> > > +            wait=True)
> > > +        _git(args=['config', '--unset', 'core.worktree'], wait=True)
> > > +        _git(args=['config', 'core.bare', 'true'], wait=True)
> > 
> > Why do you create a non-bare repository and then make it bare?
> 
> Bare repositories don't usually have upstream tracking branches.  See
> the commit message for c2001674 (nmbug: Add 'clone' and replace
> FETCH_HEAD with @{upstream}, 2014-03-09) for details [1].  I can
> resubmit this patch with a commit message that mentions the
> explanation in c2001674 if folks want the extra clarity here.

Ah, it seems that the lack of remote-tracking branches is unique to
'clone --bare'.  When I compare 'init --bare' with the above (using
Git 2.1.0), the only difference in the resulting repository is that
the the 'init --bare' form doesn't set core.logallrefupdates, while
the form above sets core.logallrefupdates to true.  I'll submit v4
using 'init --bare' and an explicit core.logallrefupdates config.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
signature.asc (application/pgp-signature)

Thread: