#!/bin/sh
#
## Undeletes a file.
## Source: git-extra-commands

# Restore a file that was deleted.
#
# Usage:
#   `git-undelete filename`

# shellcheck disable=SC2046
exec git checkout $(git rev-list -n 1 HEAD -- "$1")^ -- "$1"
