# Written by the git wrapper for its commit service (cli-git-unit); the wrapper rewrites this file when it changes.
# One instance per worktree: the instance name is a hash of the worktree's own Git directory (service_instance.rs).
[Unit]
Description=Commit service of one worktree for the git wrapper
Requires=cli-git@%i.socket
After=cli-git@%i.socket
[Service]
# The wrapper replaces the program and Git words below, each written between two at-signs, with absolute paths. The socket
# comes from the socket unit, so the program is never started by the wrapper and is started again by the first
# connection after an exit or a crash. The instance refuses every message about another worktree.
ExecStart=@SERVICE_BINARY@ --journal %S/cli-git/service/%i --git @GIT@ --instance %i
StateDirectory=cli-git/service/%i
Restart=on-failure
MemoryMax=1G
TasksMax=512
CPUQuota=200%
IOWeight=50