Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:59

Adeodato Simó [off-list ref] writes:
* Junio C Hamano [Sun, 18 Jan 2009 11:59:35 -0800]:
...
quoted
    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.
quoted
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?
I thought rerere does not kick in if rr-cache is absent, and it kicks in
if rr-cache is present when you do not explicitly disable it.  So creation
of directory is a way to enable it.  Besides, the net effect for a person
who does not want to have the bare repository contaminated with these
directories is the same.  The original repository aquires them.

As I said already, I suspect that it would be more useful in practice to
create these directories as your patch did, than making the new workdir
inherit the lack of rerere and reflog support if the original repository
lacked them.  I just wanted to see some documentation that makes it clear
that the original repository _is_ modified by a creation of a new workdir.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help