{"thread":{"id":"16883","subject":"[git-new-workdir RFC] Backlinking $workdir/logs/HEAD to $GIT_DIR/logs/workdir?","startedAt":"2008-12-27T12:15:26Z","lastAt":"2008-12-27T17:26:07Z","messageCount":2,"participants":["Adeodato Simó","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98790","messageId":"20081227121526.GA12120@chistera.yi.org","threadId":"16883","inReplyTo":null,"subject":"[git-new-workdir RFC] Backlinking $workdir/logs/HEAD to $GIT_DIR/logs/workdir?","fromName":"Adeodato Simó","fromEmail":"dato@net.com.org.es","sentAt":"2008-12-27T12:15:26Z","receivedAt":"2008-12-27T12:15:26Z","isPatch":false,"sender":{"key":"dato@net.com.org.es","avatar":"https://gravatar.com/avatar/952ec7d5d5663eb8baf631b5c37f9c58480a881920dd5f8a2d3a71f969b72b53?d=mp&s=160"},"body":"Hello,\n\nI use git new-workdir for some of my projects. Apart from the usual\ncaveat \"don't checkout the same branch twice\", I found another small\nissue, surely known: the reflog for HEAD in the workidirs does not exist\nin the source git repo, hence git-gc will happily prune what it believes\nto be dangling commits.\n\nWould it be, perhaps, be okay to create a logs/workdir/<name>/HEAD\nsymlink pointing to $workdir/logs/HEAD, so that this does not happen?\n\nComments welcome.\n\n-- \nAdeodato Simó                                     dato at net.com.org.es\nDebian Developer                                  adeodato at debian.org\n \n                                            Listening to: Niza - Parasol\n"},{"id":"98796","messageId":"20081227172607.GA22075@spearce.org","threadId":"16883","inReplyTo":"20081227121526.GA12120@chistera.yi.org","subject":"Re: [git-new-workdir RFC] Backlinking $workdir/logs/HEAD to $GIT_DIR/logs/workdir?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-12-27T17:26:07Z","receivedAt":"2008-12-27T17:26:07Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Adeodato Simó <dato@net.com.org.es> wrote:\n> I use git new-workdir for some of my projects. Apart from the usual\n> caveat \"don't checkout the same branch twice\", I found another small\n> issue, surely known: the reflog for HEAD in the workidirs does not exist\n> in the source git repo, hence git-gc will happily prune what it believes\n> to be dangling commits.\n> \n> Would it be, perhaps, be okay to create a logs/workdir/<name>/HEAD\n> symlink pointing to $workdir/logs/HEAD, so that this does not happen?\n\nYou also need to link the ref.  A log is only scanned if the\nref by the same name is scanned.\n\nSo you'd need to create a refs/workdir/<name>/HEAD in the parent\nrepository.  Using a symlink to point to the HEAD file from the\nworkdir might just work.\n\n-- \nShawn.\n"}]}