From cb6e0a6723c8b7b0a0940a5195d8251c29f5403c Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawl9J51AO9t75xN5k0sJgg8taUo4y0a4hpQ" Date: Fri, 7 Jun 2013 23:02:29 +0000 Subject: Added a comment --- ...ment_4_2dfda33ffa39b92b16c8bd9005e1cefe._comment | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/forum/help_running_git-annex_on_top_of_existing_repo/comment_4_2dfda33ffa39b92b16c8bd9005e1cefe._comment diff --git a/doc/forum/help_running_git-annex_on_top_of_existing_repo/comment_4_2dfda33ffa39b92b16c8bd9005e1cefe._comment b/doc/forum/help_running_git-annex_on_top_of_existing_repo/comment_4_2dfda33ffa39b92b16c8bd9005e1cefe._comment new file mode 100644 index 000000000..e9f22adfd --- /dev/null +++ b/doc/forum/help_running_git-annex_on_top_of_existing_repo/comment_4_2dfda33ffa39b92b16c8bd9005e1cefe._comment @@ -0,0 +1,21 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawl9J51AO9t75xN5k0sJgg8taUo4y0a4hpQ" + nickname="Daniel" + subject="comment 4" + date="2013-06-07T23:02:29Z" + content=""" +I'm trying to find a way to prevent developers from adding certain file types to the main repo. Is there something like a pre-add hook that could be used? + +I found this in another forum but I'm not sure how it was intended to be implemented. + +``` +git check-attr addtoannex \"$FILE\" | grep -q \": set$\" +if [ $? -eq 0 ]; then + git annex add \"$FILE\" +else + git add \"$FILE\" +fi +``` + +[http://git-annex.branchable.com/forum/Let_watch_selectively_annex_files/](http://git-annex.branchable.com/forum/Let_watch_selectively_annex_files/) +"""]] -- cgit v1.2.3