From: Julian Phillips Date: Sat, 14 Jul 2007 13:09:57 GMT Subject: Re: mtimes of working files Message-ID: In-Reply-To: <1184370414.2785.79.camel@shinybook.infradead.org> On Sat, 14 Jul 2007, David Woodhouse wrote: > On Fri, 2007-07-13 at 16:18 -0700, Linus Torvalds wrote: >> Why would anybody force you to do that? >> >> The "switch between branchs in the same repo" is really convenient. >> But nobody *forces* you to do it. > > This is true. I already mirror a bunch of CVS and SVN repositories into > git so that I can use them without too much pain¹, and I can do the same > for git trees which use branches too; mirroring them into a bunch of > separate trees for easy access. > > On the occasions I actually try to _use_ branches, I find it very > suboptimal. Perhaps it's just because I'm stupid. I'm sure that's why I > ended up committing changes to the wrong branch. But having to rebuild > (even with ccache) after changing branches is a PITA. Just changing > branches at all is a PITA if you have uncommitted changes (which I > usually do because I've usually tested _some_ random patch in a build > tree for the hardware which is closest to hand). Pulling a whole bunch > of unwanted changes on the 'development' branch while on GPRS, when all > I really needed was a single commit from the 'stable' branch also didn't > amuse me, although I'm sure if I had the time to play with it I'd have > been able to avoid that. > > I can, and do, mirror stuff from all kinds of suboptimal version control > systems into single-branch git trees. And I include multi-branched git > trees in my definition of 'suboptimal'. My ability to do that doesn't > really help the newbies who are expected with branches, though. You can flatten a multi-branched git repo without mirroring into multiple single-branch repos - The ability to pull out branches into separate trees from a single repository was what the git-new-workdir script in contrib was written for. While I find branches quite a natural concept having used the for the past few years in Subversion and CVS before that (and after that branches in git are a delight to use), I still like to have access to all of the branches that I am working on as separate trees. git-new-workdir allowed me to do that by scripting an approach described by Junio. Though maybe it has been superseeded by some built-in feature? I haven't been following things that closely recently, and ISTR that there was talk of a feature that would make the script obsolete. -- Julian --- You're at Witt's End.