Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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"
    }


I 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%




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: