aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar https://www.google.com/accounts/o8/id?id=AItOawksKHc0H_4WXgagabhi8w3dJjgkAl335R4 <Tom@web>2013-02-07 09:48:23 +0000
committerGravatar admin <admin@branchable.com>2013-02-07 09:48:23 +0000
commita647b26e327c33403795724a75d8e1a59eb371c7 (patch)
tree684c6222961c39255f6307124c86977ed868d40a
parent474324a5a3e74738b0583450cca7d408c5f69473 (diff)
-rw-r--r--doc/forum/Let_watch_selectively_annex_files.mdwn24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/forum/Let_watch_selectively_annex_files.mdwn b/doc/forum/Let_watch_selectively_annex_files.mdwn
new file mode 100644
index 000000000..52da60293
--- /dev/null
+++ b/doc/forum/Let_watch_selectively_annex_files.mdwn
@@ -0,0 +1,24 @@
+Hello,
+
+First of all, thanks to Joey for developing git-annex, good job!
+
+I have a small feature request: when running git annex watch, new files are automatically added to the annex. It would be nice to let this depend on an attribute: add a file to annex if an attribute is set, otherwise do a regular git add.
+
+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
+
+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
+
+It would be great if the watcher could honour an attribute.
+
+best regards,
+Tom