This commit is contained in:
parent
be1b52dbcb
commit
02257e4856
1 changed files with 11 additions and 8 deletions
|
@ -7,18 +7,21 @@ I have a small feature request: when running git annex watch, new files are auto
|
||||||
My use-case is the following: I have a repository containing documents I'm working on (mostly LaTeX), which I'd like to be regular files in git (no annex), and a bunch of extra documentation (pdfs) and images, which I'd like to go to the annex. I currently set a git-attribute (addtoannex), and use a shell script to selectively add files to annex as follows:
|
My use-case is the following: I have a repository containing documents I'm working on (mostly LaTeX), which I'd like to be regular files in git (no annex), and a bunch of extra documentation (pdfs) and images, which I'd like to go to the annex. I currently set a git-attribute (addtoannex), and use a shell script to selectively add files to annex as follows:
|
||||||
|
|
||||||
Content of .gitattributes:
|
Content of .gitattributes:
|
||||||
*.png addtoannex
|
|
||||||
*.jpg addtoannex
|
*.png addtoannex
|
||||||
|
*.jpg addtoannex
|
||||||
|
|
||||||
Snippet of add script:
|
Snippet of add script:
|
||||||
git check-attr addtoannex "$FILE" | grep -q ": set$"
|
|
||||||
if [ $? -eq 0 ]; then
|
git check-attr addtoannex "$FILE" | grep -q ": set$"
|
||||||
git annex add "$FILE"
|
if [ $? -eq 0 ]; then
|
||||||
else
|
git annex add "$FILE"
|
||||||
git add "$FILE"
|
else
|
||||||
fi
|
git add "$FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
It would be great if the watcher could honour an attribute.
|
It would be great if the watcher could honour an attribute.
|
||||||
|
|
||||||
best regards,
|
best regards,
|
||||||
|
|
||||||
Tom
|
Tom
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue