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

Re: [PATCH] contrib/workdir: create logs/refs and rr-cache in the origin repository

From
Adeodato Simó <dato@net.com.org.es>
Date
Jan 19, 2009, 12:20 UTC
Message-ID
<20090119122018.GA25566@chistera.yi.org>
In-Reply-To
<7vskngwfko.fsf@gitster.siamese.dyndns.org>
* Junio C Hamano [Sun, 18 Jan 2009 11:59:35 -0800]:
> Adeodato Simó <dato@net.com.org.es> writes:
Show 5 quoted lines
> > However, I've as of late directly created bare repositories knowing that
> > I wanted to work just with workdirs against it. In this case, the logs
> > for each checkout'ed branch will be stored in the workdirs and not the
> > repo, so deleting the workdir will make you lose those logs. Which is
> > bad, since workdirs should always be safe to delete.
Show 5 quoted lines
> I had to think about the above for a while, but after realizing that you
> have a strict distinction between a "workdir" and a normal "repository
> with a work tree" in mind, I can see where you are coming from.  A workdir
> is transient in nature and you should be able to dismiss it safely as long
> as the repository it borrows from is intact.

The thing, for me, is that a workdir should result in effects as close as possible as doing the work in the repository with the workdir itself. I normally use workdirs when it's not feasible to do the work in the repo itself (eg., there's work in progress I'd rather have around, rather than committing it to a temporary branch, to leave the repo "clean" for further work).

Show 6 quoted lines
>     A workdir is a new work area that is not a normal "work tree with a
>     full repository", but borrows from an existing repository.  Any side
>     effect from the work you do in a workdir will be saved in the original
>     repository, and removing one would lose only the three kind of
>     information listed above.  Creating a new workdir has the side effect
>     of enabling reflogs and rerere in the original repository.
> But the last sentence somehow feels dirty.

I really don't understand that last sentence. Does "mkdir logs/refs rr-cache" *enable* reflogs and rerere at all? Or, rather, it just gives an empty space for the workdirs "connecting" to it to save their reflogs and rerere stuff iff they are configured to do so?

Cheers,
-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
Love in your heart wasn't put there to stay.
Love isn't love 'til you give it away.
                -- Oscar Hammerstein II
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 6 in “contrib/workdir: create logs/refs and rr-cache in the origin repository”
  1. contrib/workdir: create logs/refs and rr-cache in the origin repositoryAdeodato Simó, Jan 17, 2009
  2. Junio C HamanoJan 18, 2009
  3. Adeodato SimóJan 18, 2009
  4. Junio C HamanoJan 18, 2009
  5. Adeodato SimóJan 19, 2009
  6. Junio C HamanoJan 19, 2009

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.