From: Kevin Daudt <me@ikke.info>
To: Michael Tutty <mtutty@gforgegroup.com>
Cc: git@vger.kernel.org
Subject: Re: Bug? git worktree fails with master on bare repo
Date: Sun, 9 Oct 2016 08:50:46 +0200 [thread overview]
Message-ID: <20161009065046.GD25613@ikke.info> (raw)
In-Reply-To: <CAOi_75+2SG2WYHBMQhfGj96eKsZ66niJzOevVGM5eJv-qqrVNg@mail.gmail.com>
On Sat, Oct 08, 2016 at 07:30:36PM -0500, Michael Tutty wrote:
> Hey all,
> I'm working on some server-side software to do a merge. By using git
> worktree it's possible to check out a given branch for a bare repo and
> merge another branch into it. It's very fast, even with large
> repositories.
>
> The only exception seems to be merging to master. When I do git
> worktree add /tmp/path/to/worktree master I get an error:
>
> [fatal: 'master' is already checked out at '/path/to/bare/repo']
>
> But this is clearly not true, git worktree list gives:
>
> [/path/to/bare/repo (bare)]
>
> ...and of course, there is no work tree at that path, just the bare
> repo files you'd expect.
A bare repo still has a HEAD, which by default points to
refs/heads/master. That's what's it complaining about.
So the question is, should there be an exception for the branch 'checked
out' on a bare reposity.
next prev parent reply other threads:[~2016-10-09 6:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-09 0:30 Bug? git worktree fails with master on bare repo Michael Tutty
2016-10-09 6:50 ` Kevin Daudt [this message]
2016-10-09 7:51 ` Dennis Kaarsemaker
2016-10-09 10:52 ` Duy Nguyen
2016-10-09 13:42 ` Michael Tutty
2016-10-10 9:45 ` Duy Nguyen
2016-10-10 13:06 ` Michael Tutty
2016-10-11 15:41 ` Kevin Daudt
2016-10-12 16:41 ` [PATCH] worktree: allow the main brach of a bare repository to be checked out Dennis Kaarsemaker
2016-10-12 17:35 ` Michael Tutty
2016-10-12 18:37 ` Junio C Hamano
2016-10-12 18:50 ` Junio C Hamano
2016-10-13 10:31 ` Duy Nguyen
2016-10-12 19:23 ` Dennis Kaarsemaker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161009065046.GD25613@ikke.info \
--to=me@ikke.info \
--cc=git@vger.kernel.org \
--cc=mtutty@gforgegroup.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).