Comments (8)
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.
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.
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.
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.
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.
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.
You're right. From that point of view it really makes sense.
from datalad.
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)
- replace uses of pkg_resources HOT 1
- create a "gitignore" procedure HOT 1
- No annex uuid after "git annex initremote" HOT 1
- Issue with symlinked top level repository directory HOT 6
- test_unannex_etc fails on windows HOT 7
- datalad install <url> without "-s" taught me wrong HOT 5
- Migrate to use --json interfaces of git-annex where possible
- Datalad asks for login keyring forever HOT 10
- FOI: sphinx_rtd_theme need an upgrade if sphinx gets to 7.0.0
- How to datalad update and merge new branch created in remote? HOT 2
- I think 'annex sync' might have "lost" my commit HOT 2
- Split a dataset without touching hosted data HOT 8
- After unlock, saving again will not change the data to symlink HOT 1
- we do not crash informatively while running outdated git
- Moving files between subdatasets? HOT 2
- datalad.api.copy_file is quite slow? HOT 4
- `datalad save` on the data with different owner gets "permission denied"
- Documentation for `datalad.get.subdataset-source-candidate` option gives an incorrect property for URL of a configured remote HOT 3
- Subdataset source candidate cost inconsistent defaults HOT 2
- datalad install does not respect --branch option HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datalad.