*.sh: avoid hardcoding $GIT_DIR/hooks/...
If $GIT_COMMON_DIR is set, it should be $GIT_COMMON_DIR/hooks/, not $GIT_DIR/hooks/. Just let rev-parse --git-path handle it. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3bc518084a
commit
b849b954d2
@ -94,10 +94,8 @@ finish_rb_merge () {
|
||||
if test -s "$state_dir"/rewritten
|
||||
then
|
||||
git notes copy --for-rewrite=rebase <"$state_dir"/rewritten
|
||||
if test -x "$GIT_DIR"/hooks/post-rewrite
|
||||
then
|
||||
"$GIT_DIR"/hooks/post-rewrite rebase <"$state_dir"/rewritten
|
||||
fi
|
||||
hook="$(git rev-parse --git-path hooks/post-rewrite)"
|
||||
test -x "$hook" && "$hook" rebase <"$state_dir"/rewritten
|
||||
fi
|
||||
say All done.
|
||||
}
|
||||
|
Reference in New Issue
Block a user