mirror of
https://github.com/tj/git-extras.git
synced 2026-09-13 08:56:19 -04:00
git-paste: check pastebinit before running it
We don't force to install pastebinit because it is not widely used in git-extras.
This commit is contained in:
parent
ecff5e1a3c
commit
3b2f6611d6
|
|
@ -1,5 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
if ! command -v pastebinit >/dev/null 2>&1; then
|
||||
echo >&2 "To run 'git paste', you need to install pastebinit in your system"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $# -ne 0 || set -- '@{u}'
|
||||
git format-patch --stdout "$@" | pastebinit -f diff
|
||||
|
|
|
|||
Loading…
Reference in a new issue