git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v1 0/3] Add post-indexchanged hook

From
Ben Peart <peartben@gmail.com>
Date
Feb 8, 2019, 19:51 UTC
Message-ID
<20190208195115.12156-1-peartben@gmail.com>
From: Ben Peart <benpeart@microsoft.com>

Add a post-indexchanged hook that is invoked after the index is written in do_write_locked_index().

This hook is meant primarily for notification, and cannot affect the outcome of git commands that trigger the index write.

VFSForGit uses this hook to be notified when a git command has made a change that could impact the virtual files projected in the working directory.

I'm submitting this in an effort to further minimize the set of differences between the VFSForGit fork and git.git in the hope that we can someday not need a separate fork at all.

Base Ref: v2.21.0-rc0
Web-Diff: https://github.com/benpeart/git/commit/639e57486a
Checkout: git fetch https://github.com/benpeart/git post-index-changed-v1 && git checkout 639e57486a
Ben Peart (2):
  read-cache: add post-indexchanged hook
  read-cache: add test for post-indexchanged hook
Kevin Willford (1):
  read-cache: Add documentation for the post-indexchanged hook
 Documentation/githooks.txt         |  18 ++++
 builtin/reset.c                    |   1 +
 builtin/update-index.c             |   2 +
 cache.h                            |   4 +-
 read-cache.c                       |  14 ++-
 t/t7113-post-index-changed-hook.sh | 144 +++++++++++++++++++++++++++++
 unpack-trees.c                     |   2 +
 7 files changed, 182 insertions(+), 3 deletions(-)
 create mode 100755 t/t7113-post-index-changed-hook.sh
base-commit: d62dad7a7dca3f6a65162bf0e52cdf6927958e78
-- 
2.20.1.windows.1
Next: Ben Peart
Message 1 of 13 in “Add post-indexchanged hook”
  1. 0/3 Add post-indexchanged hookBen Peart, Feb 8, 2019
  2. 1/3 read-cache: add post-indexchanged hookBen Peart, Feb 8, 2019
  3. brian m. carlsonFeb 8, 2019
  4. Ben PeartFeb 12, 2019
  5. 3/3 read-cache: Add documentation for the post-indexchanged hookBen Peart, Feb 8, 2019
  6. 2/3 read-cache: add test for post-indexchanged hookBen Peart, Feb 8, 2019
  7. read-cache: add post-indexchanged hookBen Peart, Feb 14, 2019
  8. Ramsay JonesFeb 14, 2019
  9. Junio C HamanoFeb 14, 2019
  10. Ben PeartFeb 15, 2019
  11. Junio C HamanoFeb 15, 2019
  12. Ben PeartFeb 15, 2019
  13. read-cache: add post-index-change hookBen Peart, Feb 15, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.