* Put part of working tree on another file-system.
@ 2007-12-05 13:44 Sergei Organov
2007-12-05 15:34 ` Rogan Dawes
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Organov @ 2007-12-05 13:44 UTC (permalink / raw
To: git
Hello,
I've a desire to put a sub-tree of my working tree into another
file-system. With CVS I've used symlink to achieve this. It works fine
with CVS as it doesn't care about directories and symlinks at all. I had
little hope it will work with GIT, but I've performed a test anyway. To
my surprise it almost worked, so I have a hope that maybe it's not that
difficult to support this. What do you think? Or maybe there is a
different way to achieve the goal with GIT?
The test has been performed in a clone of the git tree (my comments are
prefixed by "osv>"):
$ git status
# On branch master
nothing to commit (working directory clean)
$ mv gitweb ../ && ln -s ../gitweb .
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# gitweb
nothing added to commit but untracked files present (use "git add" to track)
osv> here GIT is slightly confused by the change of a directory to a
osv> symlink to a directory.
$ echo hehe >> gitweb/INSTALL
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
#
# modified: gitweb/INSTALL
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# gitweb
no changes added to commit (use "git add" and/or "git commit -a")
osv> here confusion is more obvious as GIT reports modified file in an
osv> untracked directory.
$ git commit -a
Created commit 7470207: The commit
1 files changed, 1 insertions(+), 0 deletions(-)
$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# gitweb
nothing added to commit but untracked files present (use "git add" to track)
osv> surprisingly nothing very bad happened, -- GIT has commited the
osv> modified file just fine, and left the symlink unchanged.
$ git reset --hard HEAD^
HEAD is now at 7a4a2e1... Set OLD_ICONV on Cygwin.
[osv@fulcrum git]$ git status
# On branch master
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
#
# deleted: gitweb/README
# deleted: gitweb/git-favicon.png
# deleted: gitweb/git-logo.png
# deleted: gitweb/gitweb.css
# deleted: gitweb/gitweb.perl
# deleted: gitweb/test/Märchen
# deleted: gitweb/test/file with spaces
# deleted: gitweb/test/file+plus+sign
#
no changes added to commit (use "git add" and/or "git commit -a")
osv> Ooops, -- now things begin to be more seriously broken. The result
osv> is that GIT removed the symlink, created gitweb directory, and put
osv> only INSTALL file into it. The directory the symlink was pointing
osv> to has the rest of files but INSTALL.
$ git reset --hard HEAD
HEAD is now at 7a4a2e1... Set OLD_ICONV on Cygwin.
$ git status
# On branch master
nothing to commit (working directory clean)
osv> This is now as expected, -- GIT just re-populated the gitweb
osv> directory as there is no symlink anymore.
--
Sergei.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Put part of working tree on another file-system.
2007-12-05 13:44 Put part of working tree on another file-system Sergei Organov
@ 2007-12-05 15:34 ` Rogan Dawes
2007-12-05 17:07 ` Sergei Organov
0 siblings, 1 reply; 3+ messages in thread
From: Rogan Dawes @ 2007-12-05 15:34 UTC (permalink / raw
To: Sergei Organov; +Cc: git
Sergei Organov wrote:
> Hello,
>
> I've a desire to put a sub-tree of my working tree into another
> file-system. With CVS I've used symlink to achieve this. It works fine
> with CVS as it doesn't care about directories and symlinks at all. I had
> little hope it will work with GIT, but I've performed a test anyway. To
> my surprise it almost worked, so I have a hope that maybe it's not that
> difficult to support this. What do you think? Or maybe there is a
> different way to achieve the goal with GIT?
>
I needed to do this in Cygwin, and saw the same behaviour. I worked
around it by using cygwin's "mount" command to "mount" the other
directory in Cygwin's namespace. With this done, cygwin does not detect
a symlink (since there is none), and works as expected.
With sufficient permissions, you can probably achieve the same effect
with bind mounts perhaps (assuming Linux, of course).
Rogan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Put part of working tree on another file-system.
2007-12-05 15:34 ` Rogan Dawes
@ 2007-12-05 17:07 ` Sergei Organov
0 siblings, 0 replies; 3+ messages in thread
From: Sergei Organov @ 2007-12-05 17:07 UTC (permalink / raw
To: Rogan Dawes; +Cc: git
Rogan Dawes <lists@dawes.za.net> writes:
> Sergei Organov wrote:
>> Hello,
>>
>> I've a desire to put a sub-tree of my working tree into another
>> file-system. With CVS I've used symlink to achieve this. It works fine
>> with CVS as it doesn't care about directories and symlinks at all. I had
>> little hope it will work with GIT, but I've performed a test anyway. To
>> my surprise it almost worked, so I have a hope that maybe it's not that
>> difficult to support this. What do you think? Or maybe there is a
>> different way to achieve the goal with GIT?
>>
>
> I needed to do this in Cygwin, and saw the same behaviour. I worked
> around it by using cygwin's "mount" command to "mount" the other
> directory in Cygwin's namespace. With this done, cygwin does not
> detect a symlink (since there is none), and works as expected.
>
> With sufficient permissions, you can probably achieve the same effect
> with bind mounts perhaps (assuming Linux, of course).
Thanks for the idea, -- it seems to work.
[In fact it is Linux, and those "another file-system" is FAT32 partition,
so that, when rebooting to Windoze, this directory could be accessed from
there. I can't put all the working tree there as there are parts of the
tree that depend on file system being case-sensitive.]
--
Sergei.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-05 17:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 13:44 Put part of working tree on another file-system Sergei Organov
2007-12-05 15:34 ` Rogan Dawes
2007-12-05 17:07 ` Sergei Organov
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).