git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: man page for "git-worktree" is a bit confusing WRT "prune"

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Nov 14, 2017, 08:47 UTC
Message-ID
<alpine.LFD.2.21.1711140345430.12112@localhost.localdomain>
In-Reply-To
<CAPig+cR2W2zKcjLYjd1E4jhMkad3O2ioncCZhkExGopxa_0_xg@mail.gmail.com>
On Mon, 13 Nov 2017, Eric Sunshine wrote:
> On Mon, Nov 13, 2017 at 4:06 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
... snip ...
Show 17 quoted lines
> >   how is this "expire time" measured? relative to what? i've
> > looked under .git/worktrees/<wtname>, and i see a bunch of files
> > defining that worktree, but it's not clear how a worktree stores
> > the relevant time to be used for the determination of when a
> > worktree "expires".
>
> According to Documentation/gitrepository-layout.txt:
>
>     worktrees/<id>/gitdir::
>         A text file containing the absolute path back to the .git file
>         that points to here. This is used to check if the linked
>         repository has been manually removed and there is no need to
>         keep this directory any more. The mtime of this file should be
>         updated every time the linked repository is accessed.
>
> So, the expire time is relative to the mtime of the 'gitdir' file for
> that worktree...
  yup, that clears it up, thanks.
rday
-- 
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Previous: Eric Sunshine
Message 5 of 5 in “man page for "git-worktree" is a bit confusing WRT "prune"”
  1. Robert P. J. DayNov 13, 2017
  2. Eric SunshineNov 13, 2017
  3. Robert P. J. DayNov 13, 2017
  4. Eric SunshineNov 14, 2017
  5. Robert P. J. DayNov 14, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.