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

Re: File Systems and a Theory of Edits

From
MNMichael Nahas <mike.nahas@gmail.com>
Date
Aug 1, 2011, 12:01 UTC
Message-ID
<CADo4Y9gtsKS660GCXObMeKztED+EJLBtHDHregvbMyR3S2_gUQ@mail.gmail.com>
In-Reply-To
<CADo4Y9i=PYBv33Jnu2osQX_FL97ng9FZ8TFeMMuc5CDGUhu1Gg@mail.gmail.com>
Michael,

I've been thinking about it and "git mount" is the right idea. I like it a lot. In fact, the most common usage of "git checkout" can be totally replaced by "git mount".

The other usage of "git checkout -- file" can be replaced by "git cp".
Mike
On Sun, Jul 31, 2011 at 5:13 PM, Michael Nahas <mike.nahas@gmail.com> wrote:
Show 40 quoted lines
> Why not "git mount" indeed!
>
> At work, I have 3 very active branches and a slow build system.  Right
> now, when I switch to a new branch, I have to rebuild everything.
> Being able to "git mount" 3 snapshots in 3 directories with three
> different build outputs would make switching branches faster.
>
> 3 working trees would be even better.  I've been wondering if I can
> make another working trees by creating a .git/ directory and
> symlinking to the .git/objects and ./git/refs of my current
> repository.  (I could use the environment variables GIT_INDEX_FILE and
> GIT_WORKING_TREE, but that would require setting and resetting them.
> Or using a different shell.)
>
> So a true "git mount" that allowed mounting editable branches would be
> very useful to me.  (Although, if it wasn't for that crappy build
> system, I prefer a single working tree.)
>
> Mike Nahas
>
>
> On Sun, Jul 31, 2011 at 1:21 PM, Michael Witten <mfwitten@gmail.com> wrote:
>> On Sun, Jul 31, 2011 at 14:15, Michael Nahas <mike.nahas@gmail.com> wrote:
>>> I believe the solution for xargs may be John D.'s solution - to
>>> "mount" the snapshot as a file system.  And the "mount" command in git
>>> is "git checkout".  (Now, I almost want to rename "git checkout" to
>>> "git remount"!)
>>
>> Why not just `git mount', though? We could have different mount points
>> too, so that it's easy to work with multiple `snapshots' at once (in
>> the spirit of bazaar and mercurial, as well).
>>
>> Perhaps `git umount' could be used to make the repository bare.
>>
>> In any case, I always find myself wishing that the standard interfaces
>> would make it easier to base an operation on a snapshot that is not
>> yet mounted as the working tree. It can be quite cumbersome to switch
>> the contents of the working tree.
>>
>
Previous: Michael NahasNext: René Scharfe
Message 14 of 15 in “File Systems and a Theory of Edits”
  1. Michael NahasJul 30, 2011
  2. Ævar Arnfjörð BjarmasonJul 30, 2011
  3. René ScharfeJul 31, 2011
  4. Junio C HamanoAug 1, 2011
  5. Michael NahasAug 1, 2011
  6. John M. DlugoszJul 30, 2011
  7. Michael WittenJul 31, 2011
  8. Jeff KingAug 1, 2011
  9. Michael NahasJul 31, 2011
  10. Michael WittenJul 31, 2011
  11. Michael NahasJul 31, 2011
  12. Andreas SchwabJul 31, 2011
  13. Michael NahasJul 31, 2011
  14. Michael NahasAug 1, 2011
  15. René ScharfeJul 31, 2011

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.