aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar https://www.google.com/accounts/o8/id?id=AItOawksKHc0H_4WXgagabhi8w3dJjgkAl335R4 <Tom@web>2013-02-07 11:59:35 +0000
committerGravatar admin <admin@branchable.com>2013-02-07 11:59:35 +0000
commit890cd0136f27e71c8dc0e3573e8399015f57937d (patch)
tree2dc54a7876b58c46ae5e83a10c87ccb9a979d1e0
parent02fa25e9dc35e6d2a32da5ef946ce41e8ed2d48e (diff)
-rw-r--r--doc/forum/Let_watch_selectively_annex_files.mdwn19
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/forum/Let_watch_selectively_annex_files.mdwn b/doc/forum/Let_watch_selectively_annex_files.mdwn
index 52da60293..f56b19452 100644
--- a/doc/forum/Let_watch_selectively_annex_files.mdwn
+++ b/doc/forum/Let_watch_selectively_annex_files.mdwn
@@ -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:
Content of .gitattributes:
-*.png addtoannex
-*.jpg addtoannex
+
+ *.png addtoannex
+ *.jpg addtoannex
Snippet of add script:
-git check-attr addtoannex "$FILE" | grep -q ": set$"
-if [ $? -eq 0 ]; then
- git annex add "$FILE"
-else
- git add "$FILE"
-fi
+
+ git check-attr addtoannex "$FILE" | grep -q ": set$"
+ if [ $? -eq 0 ]; then
+ git annex add "$FILE"
+ else
+ git add "$FILE"
+ fi
It would be great if the watcher could honour an attribute.
best regards,
+
Tom