git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Bryan Turner <bturner@atlassian.com>
Cc: Thierry Moreau <thierry.moreau@connotech.com>,
	Git Users <git@vger.kernel.org>
Subject: Re: Self-inflicted "abort" in a newbie attempt at read-only exploration of a cloned repository?
Date: Fri, 6 Apr 2018 15:56:59 -0400	[thread overview]
Message-ID: <20180406195659.GD11450@sigill.intra.peff.net> (raw)
In-Reply-To: <CAGyf7-E9=Mm1oJdhwHTmg2byrOxMRFVEjmYHCFGqqP8pvK=vJg@mail.gmail.com>

On Thu, Apr 05, 2018 at 04:18:23PM -0700, Bryan Turner wrote:

> The documentation for --work-tree says:
> 
> --work-tree=<path>
> 
> Set the path to the working tree. It can be an absolute path or a path
> relative to the current working directory. This can also be controlled
> by setting the GIT_WORK_TREE environment variable and the
> core.worktree configuration variable (see core.worktree in
> git-config(1) for a more detailed discussion).
> 
> So passing --work-tree tells Git where to store your _files_, but it's
> still using the same .git directory.
> 
> If your goal is to have worktrees for various versions, that implies
> the git worktree [1] command might be more along the lines of what
> you're looking for. An invocation based on above might look like this:
> $ git -C linux-stable/ worktree add $PWD/tmp/ checkout linux-4.15.y

Everything you've said here is completely accurate. But the original
report does make me wonder if we've set up users for failure by
overloading the term "worktree". Clearly it means two very different
things in:

  git --work-tree=foo

and

  git worktree add foo

I'm not sure what to do about it at this point, though. :(

-Peff

  parent reply	other threads:[~2018-04-06 19:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05 19:42 Self-inflicted "abort" in a newbie attempt at read-only exploration of a cloned repository? Thierry Moreau
2018-04-05 23:18 ` Bryan Turner
2018-04-05 23:34   ` Bryan Turner
2018-04-06  0:50     ` Thierry Moreau
2018-04-06 19:56   ` Jeff King [this message]
2018-04-06 20:27     ` Thierry Moreau

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180406195659.GD11450@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=bturner@atlassian.com \
    --cc=git@vger.kernel.org \
    --cc=thierry.moreau@connotech.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).