Skip to content

dar/scripts/pre-svn-rev.sh to play nice with git #1

Open
zyv opened this Issue Apr 11, 2011 · 2 comments

1 participant

@zyv
zyv commented Apr 11, 2011

I would use

git rev-parse --verify HEAD

to obtain the SHA1 of the latest commit in the repository.

@zyv
zyv commented Apr 11, 2011

To get the last commit author:

git log -n1 --format=%an HEAD

It does not really make all that much sense, because you can look up the author by commit, but otherwise to make the author apparent with lookups you might wish to only print the name in lowercase of something along these lines...

@zyv
zyv commented Apr 11, 2011
git diff

works more or less in a same way as svn diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.