Giter Club home page Giter Club logo

Comments (8)

joeyh avatar joeyh commented on May 29, 2024

Yaroslav Halchenko wrote:

That could allow use of largefiles or whatever else to simplify interactions
with annex -- they would just automagically added to annex (instead of index)
in 'pre-add' hook, and/or may be user be alerted that he is trying to commit a
large file directly to git, while it is not matching largefiles selection, ...
Or am I dreaming @joeyh? ;-)

I tried to add some hooks around git-fetch back in 2011-2012, and fell
down a rabbit-hole where the git devs wanted to rework their
whole hook API before adding new hooks -- but had conflicting ideas
about what the new API should look like. My patches did not get
accepted.

So, while I think that a pre-add hook would be great and would be happy
for git-annex to use it, I don't know if I'm the one to get such hooks
into git.

BTW, If the hook interface doesn't involve communication on stdio,
that rabbit hole could perhaps be avoided, since that's where the
current git hook API is weak.

see shy jo

from datalad.

yarikoptic avatar yarikoptic commented on May 29, 2024

Thank you @joeyh.
May be someone would get excited enough to look into that some time again. may be @bpoldrack ? ;-) Theoretically we might not need stdio communication if all magic is just done deterministically by the hook

from datalad.

joeyh avatar joeyh commented on May 29, 2024

Yaroslav Halchenko wrote:

May be someone would get excited enough to look into that some time again. may
be @bpoldrack ? ;-) Theoretically we might not need stdio communication if all
magic is just done deterministically by the hook

Well, the hook could be run once per file added, and exit 1|0 to tell
git whether or not to go ahead with adding the file. This would be
pretty innefficient though for "git add largedir"

see shy jo

from datalad.

bpoldrack avatar bpoldrack commented on May 29, 2024

Well, I don't think this should be my first priority for now, but I can have a look at it later of course. However, I don't see why I should be the one getting this into git, when Joey isn't. Since I have no record in open source development at all, I'd be surprised by seeing them accepting a patch from me, but not from Joey. Do I miss something here?

from datalad.

yarikoptic avatar yarikoptic commented on May 29, 2024

priority -- nope. But I thought that if you like to get a better "insight" into git, investigating originally proposed solution by joey, checking if their hooks API didn't change since then (it was a bit awhile ago), and raising the question/discussion on git mailing list/forum might be beneficial. Also, as joey pointed out, such a hook implementation might be quite inefficient, so the whole issue would be an attempt into a wrong direction, unless efficient way could be figured out.
Cooking up an acceptable patch is a whole other level ;-) but who knows -- may be revived joey's would provide a good base (I didn't find it on a quick google -- @joeyh: do you have a pointer?)

from datalad.

yarikoptic avatar yarikoptic commented on May 29, 2024

re @joeyh: "and exit 1|0 to tell git whether or not to go ahead with adding the file" and meanwhile just "git annex add" it to transform to a symlink and return 0 in cases of git-annex controlled files, right?

from datalad.

bpoldrack avatar bpoldrack commented on May 29, 2024

You're right. From that point of view it really makes sense.

from datalad.

yarikoptic avatar yarikoptic commented on May 29, 2024

now that largefiles respected by 'annex add' and there is that new smudge-based mode of operation for v6, I will close this one to not drag alone.

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.