Giter Club home page Giter Club logo

Comments (15)

yarikoptic avatar yarikoptic commented on May 31, 2024

actually workaround for testing would be to clone that submodule into another temp directory -- then annex works properly

from datalad.

joeyh avatar joeyh commented on May 31, 2024

http://git-annex.branchable.com/bugs/Git_annexed_files_symlink_are_wrong_when_submodule_is_not_in_the_same_path/

Due to the way git submodules work, if you intend to use a git-annex
repository as a submodule, you can only use it as a submodule, and it
has to always be located in the same place relative to its parent
module.

I do not see a way around this. (Other than using direct mode.)

see shy jo

from datalad.

yarikoptic avatar yarikoptic commented on May 31, 2024

ah right -- just stoke me that indeed if repository is initialized as an existing submodule (not added anew) its .git is just a file containing a pointer to "upstairs" .git/ directory ... lame :-/ And the only way around this was if annex was not hidden under .git/annex but rather was an independent directory in the root of the repository (e.g. as .annex).

So is important to keep it in mind as a limitation of git-annex then (existing independent annex'ed repos can't be used as submodules), heh heh

from datalad.

yarikoptic avatar yarikoptic commented on May 31, 2024

@joeyh but how much git-annex relies on hardcoded .git/annex path? ;) i.e. may be some time there could be an option to initialize it outside of the .git/? ;)

from datalad.

yarikoptic avatar yarikoptic commented on May 31, 2024

Even though I have marked it as 'wontfix' for now: I have initiated a new milestone (Git-annex: big refactoring 1) where we could collate those issues we identified, you agree that they are worth tackling, but it would require a massive refactoring of annex code/structure. For now I have placed there #32 since you are already dealing with it somewhat, and it might be worth moving this #44 there?

from datalad.

joeyh avatar joeyh commented on May 31, 2024

Yaroslav Halchenko wrote:

ah right -- just stoke me that indeed if repository is initialized as an
existing submodule (not added anew) its .git is just a file containing a
pointer to "upstairs" .git/ directory ... lame :-/

It might work to replace the "gitlink" file with a symlink.

see shy jo

from datalad.

yarikoptic avatar yarikoptic commented on May 31, 2024

replacing .git with a symlink sounds like begging for a trouble ;) but I could be proven wrong (that git folks envisioned this crippled .git file as a cross-platform symlink replacement and otherwise test proper git functioning whenever .git is a symlink to somewhere high up ;))

from datalad.

yarikoptic avatar yarikoptic commented on May 31, 2024

BTW -- in #40 we were considering submodules to mitigate large collections... with #44 I guess it wouldn't be the best option really since would disallow dealing with a particular subset of annexes

from datalad.

joeyh avatar joeyh commented on May 31, 2024

(My email reply was rejected by github for some reason. Repost.)

replacing .git with a symlink sounds like begging for a trouble ;)

I tried it, and it seems to work ok, at least for the limited number of
things I know to do with submodules. Note that after converting .git to
a symlink, I had to edit .git/config and remove the core.worktree
setting.

See:
http://git-annex.branchable.com/bugs/Git_annexed_files_symlink_are_wrong_when_su
bmodule_is_not_in_the_same_path/#comment-8eeb2ec8891cf95e9d4e7623000299e4

BTW -- in #40 we were considering submodules to mitigate large collections...
with #44 I guess it wouldn't be the best option really since would disallow
dealing with a particular subset of annexes

It would be ok using the above approach, a submodule then uses the same
symlink paths as does a regular repository.

from datalad.

joeyh avatar joeyh commented on May 31, 2024

I've added submodule support to git-annex

http://git-annex.branchable.com/submodules/

Still needs testing, and it's known to not work in FAT or Windows yet,
although I think I can get it working in those situations too.

see shy jo

from datalad.

yarikoptic avatar yarikoptic commented on May 31, 2024

cool, thank you @joeyh . tested with a fresh build of git-annex(avail from neurodebian -devel now for jessie/sid) and indeed works smoothly. I will wait for your go on windows/OSX to consider it resolved fully. Cheers!

from datalad.

joeyh avatar joeyh commented on May 31, 2024

Yaroslav Halchenko wrote:

cool, thank you @joeyh . tested with a fresh build of git-annex(avail from
neurodebian -devel now for jessie/sid) and indeed works smoothly. I will wait
for your go on windows/OSX to consider it resolved fully. Cheers!

Submodules should work portably since cf903d5a3c42afd569ff0c1a2202c0e0168b6f8f

see shy jo

from datalad.

yarikoptic avatar yarikoptic commented on May 31, 2024

splendid. thank you @joeyh. I will close it then

from datalad.

yarikoptic avatar yarikoptic commented on May 31, 2024

not yet fully resolved, thus will reopen for now
http://git-annex.branchable.com/submodules/#comment-9d969fcaa6b5276b21338905d55c7cd7

from datalad.

joeyh avatar joeyh commented on May 31, 2024

Yaroslav Halchenko wrote:

not yet fully resolved, thus will reopen for now
http://git-annex.branchable.com/submodules/#
comment-9d969fcaa6b5276b21338905d55c7cd7

I'm sorry, but as a bug report, this is completely incoherent.

Happy to help if I can get a textual description of how to reproduce
the problem, reported as a bug and not an image in a forum comment.

(Also, why reopen a bug report? Bug numbers are not a scarce resource,
while time to read through a bunch of messages to get to the
problem-de-jour that is somehow releated to the original bug report is a
scarce resource.)

see shy jo

from datalad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.