* [git-new-workdir RFC] Backlinking $workdir/logs/HEAD to $GIT_DIR/logs/workdir?
@ 2008-12-27 12:15 Adeodato Simó
2008-12-27 17:26 ` Shawn O. Pearce
0 siblings, 1 reply; 2+ messages in thread
From: Adeodato Simó @ 2008-12-27 12:15 UTC (permalink / raw)
To: git
Hello,
I use git new-workdir for some of my projects. Apart from the usual
caveat "don't checkout the same branch twice", I found another small
issue, surely known: the reflog for HEAD in the workidirs does not exist
in the source git repo, hence git-gc will happily prune what it believes
to be dangling commits.
Would it be, perhaps, be okay to create a logs/workdir/<name>/HEAD
symlink pointing to $workdir/logs/HEAD, so that this does not happen?
Comments welcome.
--
Adeodato Simó dato at net.com.org.es
Debian Developer adeodato at debian.org
Listening to: Niza - Parasol
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [git-new-workdir RFC] Backlinking $workdir/logs/HEAD to $GIT_DIR/logs/workdir?
2008-12-27 12:15 [git-new-workdir RFC] Backlinking $workdir/logs/HEAD to $GIT_DIR/logs/workdir? Adeodato Simó
@ 2008-12-27 17:26 ` Shawn O. Pearce
0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2008-12-27 17:26 UTC (permalink / raw)
To: Adeodato Simó; +Cc: git
Adeodato Simó <dato@net.com.org.es> wrote:
> I use git new-workdir for some of my projects. Apart from the usual
> caveat "don't checkout the same branch twice", I found another small
> issue, surely known: the reflog for HEAD in the workidirs does not exist
> in the source git repo, hence git-gc will happily prune what it believes
> to be dangling commits.
>
> Would it be, perhaps, be okay to create a logs/workdir/<name>/HEAD
> symlink pointing to $workdir/logs/HEAD, so that this does not happen?
You also need to link the ref. A log is only scanned if the
ref by the same name is scanned.
So you'd need to create a refs/workdir/<name>/HEAD in the parent
repository. Using a symlink to point to the HEAD file from the
workdir might just work.
--
Shawn.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-27 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-27 12:15 [git-new-workdir RFC] Backlinking $workdir/logs/HEAD to $GIT_DIR/logs/workdir? Adeodato Simó
2008-12-27 17:26 ` Shawn O. Pearce
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).