mirror of
https://github.com/git/git.git
synced 2026-03-30 03:20:07 +02:00
As we are stopping the discovery for the repository directory at
filesystem boundaries by default, you might find yourself in a
situation like this:
(1) You have a tarball of some sort; you extract it $there;
$ mkdir $there && cd $there
$ tar xf /var/tmp/tarball.tar
(2) You notice that the filesystem lacks enough free space, and
move some part (say "images/") to a separate filesystem, and
bind-mount;
$ mv images $another/. && rm -fr images && mkdir images
$ mount --bind $another/images images
(3) You add everything to start the project;
$ git init && git add .
Up to this point it would work just fine, as you are at the
top of the working tree and there is no need for repository
discovery.
(4) Go down to a subdirectory and start futzing;
$ cd images && gimp naughty.jpg && git add -u
This will break as the repository discovery will not go up
outside of the "images" directory.
Help users by making "git add" notice at the step (3) above that
the working tree is spread across multiple filesystems and warn.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
45 KiB
45 KiB