3 ms·
In bash, if anyone is interested in something they can throw in their .profile gitspam () { if [ -z "$1" ] || [ "$#" -gt 1 ] || [ "$#" -lt 1 ] || grep
by nickysielicki 11y ago
In bash, if anyone is interested in something they can throw in their .profile
gitspam () {
if [ -z "$1" ] || [ "$#" -gt 1 ] || [ "$#" -lt 1 ] || grep -v "http\(s\)\?://\(.*\)\.git" <(echo "$1") &>/dev/null ; then
echo "usage: gitspam http://somedomain.tld/path/to/repo.git"
return
fi
tmpdir=$(mktemp -d)
git clone --bare "$1" "$tmpdir" &>/dev/null
cd "$tmpdir"
git log --pretty=format:'%ae' | sort -u
cd "$OLDPWD"
rm -rf "$tmpdir"
}
- nickysielicki 11y agoI hit my noprocrast before I could edit this, but I believe that this: git shortlog -se |& sed 's/^.*\(<\(.*\)>\)/\2/g' | sort -u is a quicker replacement for git log --pretty=format:'%ae' | sort -u By about 50%