git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: mtimes of working files

From
Julian Phillips <julian@quantumfyre.co.uk>
Date
Jul 14, 2007, 13:09 UTC
Message-ID
<Pine.LNX.4.64.0707141402230.3133@beast.quantumfyre.co.uk>
In-Reply-To
<1184370414.2785.79.camel@shinybook.infradead.org>
On Sat, 14 Jul 2007, David Woodhouse wrote:
Show 27 quoted lines
> 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.
Previous: Robin RosenbergNext: Jan Hudec
Message 18 of 24 in “mtimes of working files”
  1. Yakov LernerJul 11, 2007
  2. Johannes SchindelinJul 11, 2007
  3. Yakov LernerJul 11, 2007
  4. Johannes SchindelinJul 11, 2007
  5. Jan HudecJul 11, 2007
  6. Andy ParkinsJul 12, 2007
  7. David WoodhouseJul 12, 2007
  8. Theodore TsoJul 13, 2007
  9. David WoodhouseJul 13, 2007
  10. Linus TorvaldsJul 13, 2007
  11. David WoodhouseJul 13, 2007
  12. Linus TorvaldsJul 14, 2007
  13. David WoodhouseJul 14, 2007
  14. J. Bruce FieldsJul 14, 2007
  15. David WoodhouseJul 14, 2007
  16. Jakub NarebskiJul 14, 2007
  17. Robin RosenbergJul 14, 2007
  18. Julian PhillipsJul 14, 2007
  19. Jan HudecJul 14, 2007
  20. Julian PhillipsJul 14, 2007
  21. Daniel BarkalowJul 15, 2007
  22. Eric WongJul 12, 2007
  23. Randal L. SchwartzJul 12, 2007
  24. Eric WongJul 12, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.