On Mon, Sep 10, 2007 at 11:08:00PM +0100, Johannes Schindelin wrote: > From: Johannes Schindelin <Johannes.Schindelin@xxxxxx> > Date: Mon, 10 Sep 2007 23:08:00 +0100 (BST) > To: Martin Langhoff <martin.langhoff@xxxxxxxxx> > cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>, git@xxxxxxxxxxxxxxx > Subject: Re: Git gives you plenty of rope ... > Content-Type: TEXT/PLAIN; charset=US-ASCII > > Hi, > > On Tue, 11 Sep 2007, Martin Langhoff wrote: > > > On 9/11/07, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote: > > > On Mon, 10 Sep 2007, Ralf Baechle wrote: > > > > > > > 1) In a repository have .git/objects/info/alternates point back to > > > > the repository's object directory. > > > > > > What exactly did you think it would do? > > > > Recently, I have been through several machines at work adding a > > canonical "/var/cache/git" under which we add bare repos that track the > > "master" repos. After that, I add the paths to those repos to alternates > > of any git checkout in the machine, and git repack -a -d all of them. > > That actually makes some kind of sense, as a use case which triggers that > bug. > > > Both git gc (as an end-user script) and us -- we all need to be a bit > > more friendly to newbies. ;-) > > Well, I am opposed to writing "Attention: the contents of this cup are > hot, because after all you would complain if your coffee was not hot" on > it; Give Darwin a chance, will ya? > > However, I can see that git-repack (and just that, maybe even only for > some options) does the (potentially expensive) check if alternates points > to itself (you could use make_absolute_path() to normalise it, and the > result of getcwd(), and then compare them). There also is the case of chaining alternates like: repo1 -> repo2 -> repo3 Afair the git documentation doesn't explicitly allow/forbid this sort of configuration. But if yes, there would also be larger loops such as repo1 -> repo2 -> repo3 -> repo2. Ralf - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html