git-mob-tool 1.9.3

A CLI tool which can help users automatically add co-author(s) to git commits for pair/mob programming
Documentation
#!/bin/sh

set -e

# Get the global hooks directory
hooks_dir=$(git config --global core.hooksPath)

# Check if the global hooks directory is set
if [ -z "$hooks_dir" ]; then
  printf "Error: Global hooks directory is not set\n" >&2
  exit 1
fi

# Check if the global hooks directory exists
if [ ! -d "$hooks_dir" ]; then
  printf "Error: Global hooks directory does not exist: %s\n" "$hooks_dir" >&2
  exit 1
fi

# Invoke the prepare-commit-msg hook from the global hooks directory
hook_path="$hooks_dir/prepare-commit-msg"
if [ -x "$hook_path" ]; then
  exec "$hook_path" "$@"
else
  printf "Error: prepare-commit-msg hook not found or not executable in global hooks directory: %s\n" "$hook_path" >&2
  exit 1
fi