mirror of
https://github.com/paulirish/git-recent.git
synced 2026-09-10 07:26:16 -04:00
early exit if not in repo. thx @pickx. closes #32
This commit is contained in:
parent
34af71aef0
commit
d5f63cf328
|
|
@ -13,6 +13,8 @@ if ! command -v fzf >/dev/null 2>&1; then
|
||||||
echo "Error: fzf is not installed. Please install fzf to use git-recent." >&2
|
echo "Error: fzf is not installed. Please install fzf to use git-recent." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
[ "$(git rev-parse --is-inside-work-tree)" = "true" ] || exit
|
||||||
|
|
||||||
if [[ "$1" == "--help" ]]; then
|
if [[ "$1" == "--help" ]]; then
|
||||||
echo "git-recent: Browse and checkout recently used Git branches."
|
echo "git-recent: Browse and checkout recently used Git branches."
|
||||||
echo
|
echo
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue