/usr/bin/stg-show is in stgit-contrib 0.17.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #!/bin/bash
set -e
# stg-show - unlike "stg show", just "git show" with knowledge of stg refs
# Ex:
# stg-show --color-words -- files
# Copyright (c) 2007 Yann Dirson <ydirson@altern.org>
# Subject to the GNU GPL, version 2.
command=(git show)
# subsitute git id's for stg ones until --
endofpatches=0
while [ "$#" -gt 0 ]; do
case "$1" in
--) endofpatches=1; break ;;
-*) command+=("$1"); shift ;;
*) command+=( $(stg id "$1" 2>/dev/null || echo "$1") ); shift ;;
esac
done
# append remaining args
command+=("$@")
eval "${command[@]}"
|