Merge branch 'es/worktree-checkout-hook'

"git worktree add" learned to run the post-checkout hook, just like
"git checkout" does, after the initial checkout.

* es/worktree-checkout-hook:
  worktree: invoke post-checkout hook (unless --no-checkout)
This commit is contained in:
Junio C Hamano
2017-12-27 11:16:21 -08:00
3 changed files with 47 additions and 7 deletions

View File

@ -170,7 +170,8 @@ This hook cannot affect the outcome of 'git checkout'.
It is also run after 'git clone', unless the --no-checkout (-n) option is
used. The first parameter given to the hook is the null-ref, the second the
ref of the new HEAD and the flag is always 1.
ref of the new HEAD and the flag is always 1. Likewise for 'git worktree add'
unless --no-checkout is used.
This hook can be used to perform repository validity checks, auto-display
differences from the previous HEAD if different, or set working dir metadata