inotify support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest26 patches 7 repliesIn review
- v211 of 14 patches 13 repliesSuperseded
- v16 patches 6 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/26 | pkt-line.c: rename global variable buffer[] to something less genericpkt-line.c | +6 | 0 replies | |
| 2/26 | pkt-line.c: add packet_write_timeout()cache.h pkt-line.c pkt-line.h +1 more | +43 | 0 replies | |
| 3/26 | pkt-line.c: add packet_read_line_timeout()cache.h pkt-line.c pkt-line.h +1 more | +58 | 0 replies | |
| 4/26 | unix-socket: make unlink() optional in unix_stream_listen()credential-cache--daemon.c unix-socket.c unix-socket.h | +5 | 0 replies | |
| 5/26 | Add git-file-watcher and basic connection handling logic.gitignore Documentation/ Makefile +1 more | +171 | 0 replies | |
| 6/26 | file-watcher: check socket directory permissionfile-watcher.c | +32 | 0 replies | |
| 7/26 | file-watcher: remove socket on exitfile-watcher.c | +23 | 0 replies | |
| 8/26 | file-watcher: add --detachDocumentation/ cache.h daemon.c +2 more | +49 | 0 replies | |
| 9/26 | read-cache: save trailing sha-1cache.h read-cache.c | +5 | 0 replies | |
| 10/26 | read-cache: new flag CE_WATCHED to mark what file is watchedDocumentation/ cache.h read-cache.c | +49 | 0 replies | |
| 11/26 | Clear CE_WATCHED when set CE_VALID alonebuiltin/ read-cache.c | +9 | 0 replies | |
| 12/26 | read-cache: basic hand shaking to the file watcherDocumentation/ Documentation/ Makefile +5 more | +269 | 0 replies | |
| 13/26 | read-cache: ask file watcher to watch filesfile-watcher-lib.c file-watcher-lib.h file-watcher.c +1 more | +191 | 0 replies | |
| 14/26 | read-cache: put some limits on file watchingDocumentation/ Documentation/ cache.h +2 more | +56 | 0 replies | |
| 15/26 | read-cache: get changed file list from file watchercache.h file-watcher-lib.c file-watcher-lib.h +2 more | +258 | 0 replies | |
| 16/26 | git-compat-util.h: add inotify stubs on non-Linux platformsconfig.mak.uname git-compat-util.h | +44 | 0 replies | |
| 17/26 | file-watcher: inotify support, watching partDocumentation/ file-watcher.c | +238 | 0 replies | |
| 18/26 | file-watcher: inotify support, notification partfile-watcher.c | +141 | 0 replies | |
| 19/26 | Wrap CE_VALID test with ce_valid()builtin/ cache.h diff-lib.c +3 more | +12 | 0 replies | |
| 20/26 | read-cache: new variable to verify file-watcher resultsDocumentation/ cache.h read-cache.c | +29 | 0 replies | |
| 21/26 | Support running file watcher with the test suitefile-watcher-lib.c | +13 | 0 replies | |
| 22/26 | file-watcher: quit if $WATCHER/socket is gonefile-watcher.c | +24 | 0 replies | |
| 23/26 | file-watcher: tests for the daemon.gitignore Makefile file-watcher.c +2 more | +657 | 0 replies | |
| 24/26 | ls-files: print CE_WATCHED as W (or "w" with CE_VALID)Documentation/ builtin/ | +13 | 0 replies | |
| 25/26 | file-watcher: tests for the client sidefile-watcher-lib.c t/ test-file-watcher.c | +219 | 0 replies | |
| 26/26 | Disable file-watcher with system inotify on some testst/ t/ t/ +1 more | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 00/26] inotify support
I'm happy with this now. The only things left are applying ewah on the watch index extension and maybe improve lookup performance a bit. The former needs jk/pack-bitmap graduated. The latter is not urgent. Oh and maybe address "BUGS" section (more like known limitations) in git-file-watcher.txt.
For early adopters that fear a buggy file-watcher may cause update loss, set GIT_TEST_WATCHED=1 (or 2). It'll do lstat() to verify file-watcher results (so no perf. gain). Beware of race condition that may lead to false positives, mentioned in 20/26 (maybe I should do something about it).
The series can also be fetched from
https://github.com/pclouds/git.git file-watcher
Nguyễn Thái Ngọc Duy (26):
pkt-line.c: rename global variable buffer[] to something less generic pkt-line.c: add packet_write_timeout()
pkt-line.c: add packet_read_line_timeout()
unix-socket: make unlink() optional in unix_stream_listen() Add git-file-watcher and basic connection handling logic
file-watcher: check socket directory permission
file-watcher: remove socket on exit
file-watcher: add --detach
read-cache: save trailing sha-1
read-cache: new flag CE_WATCHED to mark what file is watched Clear CE_WATCHED when set CE_VALID alone
read-cache: basic hand shaking to the file watcher
read-cache: ask file watcher to watch files
read-cache: put some limits on file watching
read-cache: get changed file list from file watcher git-compat-util.h: add inotify stubs on non-Linux platforms
file-watcher: inotify support, watching part
file-watcher: inotify support, notification part
Wrap CE_VALID test with ce_valid()
read-cache: new variable to verify file-watcher results Support running file watcher with the test suite
file-watcher: quit if $WATCHER/socket is gone
file-watcher: tests for the daemon
ls-files: print CE_WATCHED as W (or "w" with CE_VALID)
file-watcher: tests for the client side
Disable file-watcher with system inotify on some tests
.gitignore | 2 + Documentation/config.txt | 19 + Documentation/git-file-watcher.txt (new) | 54 ++ Documentation/git-ls-files.txt | 1 + Documentation/technical/index-format.txt | 9 + Makefile | 3 + builtin/grep.c | 2 +- builtin/ls-files.c | 14 +- builtin/update-index.c | 12 +- cache.h | 17 + config.mak.uname | 1 + credential-cache--daemon.c | 2 +- daemon.c | 30 +- diff-lib.c | 4 +- diff.c | 2 +- file-watcher-lib.c (new) | 321 +++++++++ file-watcher-lib.h (new) | 8 + file-watcher.c (new) | 1149 ++++++++++++++++++++++++++++++ git-compat-util.h | 43 ++ pkt-line.c | 61 +- pkt-line.h | 2 + read-cache.c | 119 +++- setup.c | 25 + t/t1011-read-tree-sparse-checkout.sh | 2 + t/t2104-update-index-skip-worktree.sh | 2 + t/t7011-skip-worktree-reading.sh | 2 + t/t7012-skip-worktree-writing.sh | 2 + t/t7513-file-watcher.sh (new +x) | 382 ++++++++++ t/t7514-file-watcher-lib.sh (new +x) | 190 +++++ test-file-watcher.c (new) | 111 +++ unix-socket.c | 5 +- unix-socket.h | 2 +- unpack-trees.c | 2 +- wrapper.c | 47 ++ 34 files changed, 2591 insertions(+), 56 deletions(-) create mode 100644 Documentation/git-file-watcher.txt create mode 100644 file-watcher-lib.c create mode 100644 file-watcher-lib.h create mode 100644 file-watcher.c create mode 100755 t/t7513-file-watcher.sh create mode 100755 t/t7514-file-watcher-lib.sh create mode 100644 test-file-watcher.c
Signature · 1 line
1.8.5.2.240.g8478abd