summaryrefslogtreecommitdiff
path: root/doc/design/assistant/inotify.mdwn
blob: fd8d56e0576691c9faccbae9aa4f4eac02b83f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Finish "git annex watch" command, which runs, in the background, watching via
inotify for changes, and automatically annexing new files, etc.

There is a `watch` branch in git that adds such a command, although currently
it only handles adding new files, and nothing else. To make this really
useful, it needs to:

- notice deleted files and stage the deletion
  (tricky; there's a race with add..)
- notice renamed files, auto-fix the symlink, and stage the new file location
  **done**
- handle cases where directories are moved outside the repo, and stop
  watching them **done**
- when a whole directory is deleted, stage removal of its
  contents in the index **done**
- periodically auto-commit staged changes (avoid autocommitting when
  lots of changes are coming in)
- tunable delays before adding new files, etc
- honor .gitignore, not adding files it excludes

Also to do:

- Support OSes other than Linux; it only uses inotify currently.
  OSX and FreeBSD use the same mechanism, and there is a Haskell interface
  for it,