Merge branch 'master' of https://github.com/zyv/git-annex
This commit is contained in:
commit
492ffaa9a1
11 changed files with 329 additions and 51 deletions
|
@ -0,0 +1,63 @@
|
|||
Hi,
|
||||
I already have told about that in a comment here <http://git-annex.branchable.com/bugs/submodule_path_problem/#comment-e86330d15b714a41a07b6548fbc79bb2>, but I am not sure it will be seen.
|
||||
|
||||
Then here is an official bug report.
|
||||
### Please describe the problem.
|
||||
|
||||
I have a problem with submodules when the git repository is not a submodule everywhere.
|
||||
|
||||
For instance, if A is a git annexed repository and B another git repository. If B adds A as submodules. The symlinks added in A as submodule won't work in the original A.
|
||||
|
||||
### What steps will reproduce the problem?
|
||||
|
||||
# creating the master repository
|
||||
mkdir annex_master
|
||||
cd annex_master/
|
||||
git init
|
||||
# hack: adding a file to create the master branch
|
||||
touch start
|
||||
git add start
|
||||
git commit -m "start"
|
||||
cd ..
|
||||
# create another repository
|
||||
mkdir annex_sub
|
||||
cd annex_sub/
|
||||
git init
|
||||
# hack: adding a file to create the master branch
|
||||
touch start
|
||||
git add start
|
||||
git commit -m "start"
|
||||
# it is a annexed repository
|
||||
git annex init sub
|
||||
# add the other repository as submodule of the master one
|
||||
cd ../annex_master/
|
||||
git submodule add ../annex_sub/ module
|
||||
cd module/
|
||||
git annex init sub_module
|
||||
git annex sync origin
|
||||
# add an annexed file
|
||||
echo test > test
|
||||
git annex add
|
||||
git annex sync
|
||||
# go back to the origin repository
|
||||
cd ../../annex_sub/
|
||||
git annex sync
|
||||
ls -l
|
||||
This returns test -> ../.git/modules/module/annex/objects/w8/pv/SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2/SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
|
||||
|
||||
Actually, the file committed is correct. But the fact it points to '../.git/modules/module/...' makes the link work only if the repository is also a submodule and if this submodule is also located in the modules folder in the parent git repository.
|
||||
|
||||
I tried playing with making the repository direct and then indirect, hoping that would fix the symlinks, but it did not work.
|
||||
### What version of git-annex are you using? On what operating system?
|
||||
|
||||
$ git-annex version
|
||||
git-annex version: 4.20130802
|
||||
...
|
||||
|
||||
$ git --version
|
||||
git version 1.8.3.2
|
||||
|
||||
$ uname -a
|
||||
Linux konixwork 3.9-1-amd64 #1 SMP Debian 3.9.8-1 x86_64 GNU/Linux
|
||||
|
||||
### Please provide any additional information below.
|
|
@ -0,0 +1,67 @@
|
|||
[[!comment format=mdwn
|
||||
username="konubinix"
|
||||
ip="82.243.233.186"
|
||||
subject="Git annexed files symlink are wrong when submodule is not in the same path "
|
||||
date="2013-08-08T06:36:10Z"
|
||||
content="""
|
||||
Hi,
|
||||
|
||||
First, thanks for the great tool that is git-annex!
|
||||
|
||||
I have a problem with submodules when the git repository is not a submodule everywhere.
|
||||
|
||||
$ git-annex version
|
||||
git-annex version: 4.20130802
|
||||
...
|
||||
|
||||
$ git --version
|
||||
git version 1.8.3.2
|
||||
|
||||
I try to have a repository has a submodule of another.
|
||||
|
||||
# creating the master repository
|
||||
mkdir annex_master
|
||||
cd annex_master/
|
||||
git init
|
||||
# hack: adding a file to create the master branch
|
||||
touch start
|
||||
git add start
|
||||
git commit -m \"start\"
|
||||
cd ..
|
||||
# create another repository
|
||||
mkdir annex_sub
|
||||
cd annex_sub/
|
||||
git init
|
||||
# hack: adding a file to create the master branch
|
||||
touch start
|
||||
git add start
|
||||
git commit -m \"start\"
|
||||
# it is a annexed repository
|
||||
git annex init sub
|
||||
# add the other repository as submodule of the master one
|
||||
cd ../annex_master/
|
||||
git submodule add ../annex_sub/ module
|
||||
cd module/
|
||||
git annex init sub_module
|
||||
git annex sync origin
|
||||
# add an annexed file
|
||||
echo test > test
|
||||
git annex add
|
||||
git annex sync
|
||||
# go back to the origin repository
|
||||
cd ../../annex_sub/
|
||||
git annex sync
|
||||
ls -l
|
||||
|
||||
This returns
|
||||
test -> ../.git/modules/module/annex/objects/w8/pv/SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2/SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
|
||||
|
||||
Actually, the file committed is correct. But the fact it points to '../.git/modules/module/...' makes the link work only if the repository is also a submodule and if this submodule is also located in the modules folder in the parent git repository.
|
||||
|
||||
I would expect, since this repository is not an annex:
|
||||
test -> .git/annex/objects/w8/pv/SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2/SHA256E-s5--f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2
|
||||
|
||||
Do you think that is possible?
|
||||
|
||||
Thanks.
|
||||
"""]]
|
|
@ -0,0 +1,10 @@
|
|||
[[!comment format=mdwn
|
||||
username="https://www.google.com/accounts/o8/id?id=AItOawnXybLxkPMYpP3yw4b_I6IdC3cKTD-xEdU"
|
||||
nickname="Matt"
|
||||
subject="comment 2"
|
||||
date="2013-08-08T08:33:32Z"
|
||||
content="""
|
||||
Hi, I've sorted this now. The IP address of my laptop had changed on the local network. Fixing it then let the new fix fully work and the in-progress status of the bad repo went away.
|
||||
|
||||
Is it right that in the UI I don't see the local LAN configured branch (which I setup for speed) - it all seems to come under the jabber account now and makes an appropriate choice?
|
||||
"""]]
|
|
@ -0,0 +1,12 @@
|
|||
[[!comment format=mdwn
|
||||
username="https://www.google.com/accounts/o8/id?id=AItOawniayrgSdVLUc3c6bf93VbO-_HT4hzxmyo"
|
||||
nickname="Tobias"
|
||||
subject="comment 3"
|
||||
date="2013-08-08T12:22:28Z"
|
||||
content="""
|
||||
I also see `unfinished repository` in the assistant, but only at git remotes which don't have git-annex installed (f.e. gitlab). annex-ignore is set to true: `git config remote.gitlab.annex-ignore true`.
|
||||
|
||||
Clicking on `check status` says `Setting up this repository seems to have stalled! Make sure the remote system is available and retry`
|
||||
|
||||
git-annex version: 4.20130802-g1452ac3
|
||||
"""]]
|
|
@ -0,0 +1,10 @@
|
|||
[[!comment format=mdwn
|
||||
username="http://joeyh.name/"
|
||||
ip="2001:4978:f:21a::2"
|
||||
subject="comment 1"
|
||||
date="2013-08-07T16:27:21Z"
|
||||
content="""
|
||||
This seems like a reasonable request, so I've opened [[todo/untracked_remotes]]
|
||||
|
||||
I will note that if you know the annex.uuid of the previous AAA repository, you can make the new one use that same uuid, just `git config annex.uuid $UUID`. (`git annex fsck --fast` would be a good idea after doing that.)
|
||||
"""]]
|
|
@ -0,0 +1,67 @@
|
|||
[[!comment format=mdwn
|
||||
username="https://www.google.com/accounts/o8/id?id=AItOawniayrgSdVLUc3c6bf93VbO-_HT4hzxmyo"
|
||||
nickname="Tobias"
|
||||
subject="comment 2"
|
||||
date="2013-08-08T19:05:07Z"
|
||||
content="""
|
||||
Seems that I don't get it... Here is what I did:
|
||||
|
||||
First, I create a new repo with the assistant on `user@laptop ~/temp/annex-test`, then:
|
||||
|
||||
user@laptop ~/temp/annex-test % echo test1 > test1
|
||||
user@laptop ~/temp/annex-test % echo test2 > test2
|
||||
|
||||
user@server ~/tmp % mkdir annex-test
|
||||
user@server ~/tmp % cd annex-test
|
||||
user@server ~/tmp/annex-test % git init
|
||||
Initialized empty Git repository in /home/tobru/tmp/annex-test/.git/
|
||||
user@server ~/tmp/annex-test % git annex init
|
||||
init ok
|
||||
(Recording state in git...)
|
||||
user@server ~/tmp/annex-test % mv .git/hooks/post-update.sample .git/hooks/post-update
|
||||
user@server ~/tmp/annex-test % cat .git/hooks/post-update
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script to prepare a packed repository for use over
|
||||
# dumb transports.
|
||||
#
|
||||
# To enable this hook, rename this file to \"post-update\".
|
||||
|
||||
exec git update-server-info
|
||||
user@server ~/tmp/annex-test % chmod +x .git/hooks/post-update
|
||||
user@server ~/tmp/annex-test % echo '#!/bin/sh\ngit annex merge' > .git/hooks/post-receive
|
||||
user@server ~/tmp/annex-test % chmod +x .git/hooks/post-receive
|
||||
|
||||
user@laptop ~/temp/annex-test % git remote add server ssh://user@server/home/tobru/tmp/annex-test
|
||||
user@laptop ~/temp/annex-test % git annex assistant --stop
|
||||
user@laptop ~/temp/annex-test % git annex sync
|
||||
commit
|
||||
ok
|
||||
pull server
|
||||
warning: no common commits
|
||||
remote: Counting objects: 5, done.
|
||||
remote: Compressing objects: 100% (3/3), done.
|
||||
remote: Total 5 (delta 1), reused 0 (delta 0)
|
||||
Unpacking objects: 100% (5/5), done.
|
||||
From ssh://server.tobru.local/home/tobru/tmp/annex-test
|
||||
* [new branch] git-annex -> server/git-annex
|
||||
ok
|
||||
(merging server/git-annex into git-annex...)
|
||||
(Recording state in git...)
|
||||
push server
|
||||
Counting objects: 27, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (20/20), done.
|
||||
Writing objects: 100% (25/25), 2.36 KiB, done.
|
||||
Total 25 (delta 2), reused 0 (delta 0)
|
||||
remote: merge git-annex (merging synced/git-annex into git-annex...)
|
||||
remote: ok
|
||||
To ssh://tobru@server.tobru.local/home/tobru/tmp/annex-test
|
||||
* [new branch] git-annex -> synced/git-annex
|
||||
* [new branch] master -> synced/master
|
||||
ok
|
||||
user@laptop ~/temp/annex-test % git annex assistant
|
||||
|
||||
Now I expect the files `test1` and `test2` to be at `user@server ~/tmp/annex-test`. But they are not displayed.
|
||||
What am I doing wrong? The main thing I wan't to achieve: Push the files from `laptop` to `server` without adding `laptop` as remote on the server.
|
||||
"""]]
|
|
@ -0,0 +1,8 @@
|
|||
[[!comment format=mdwn
|
||||
username="http://joeyh.name/"
|
||||
ip="2001:4978:f:21a::2"
|
||||
subject="comment 1"
|
||||
date="2013-08-07T16:34:18Z"
|
||||
content="""
|
||||
This is a bug in the 1.8.4 pre-release version of git. It will be fixed in the 1.8.4 release or another pre-release. git-annex version 4.20130802 has a workaround for this problem.
|
||||
"""]]
|
|
@ -0,0 +1,12 @@
|
|||
[[!comment format=mdwn
|
||||
username="http://joeyh.name/"
|
||||
ip="2001:4978:f:21a::2"
|
||||
subject="comment 12"
|
||||
date="2013-08-07T16:31:30Z"
|
||||
content="""
|
||||
The Linux standalone builds for i386 and amd64 will not work on Arm systems.
|
||||
|
||||
There are builds of git-annex for arm in eg, Debian. You should be able to use one of those if this system is running Debian. You may need to upgrade to eg, Debian stable, which includes git-annex.
|
||||
|
||||
It looks like you have an old and/or broken GHC compiler too. You could upgrade that to a newer version (eg from Debian stable) and build it that way, but it seems like the long way around if you have a Debian system there.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue