On Thu, Dec 08, 2011 at 12:08:30PM +0100, David Kastrup wrote:
> Graham Percival <[email protected]> writes:
> 
> > ~/src/lilypond$ git rev-parse "origin/master@{3 months ago}"
> > 95fab3ca9692b197c2a26c5249d7f30b114ab451
> >
> 
> Uh, @ specifications are for the _reflog_.  That is something maintained
> strictly locally, for fixing things when you messed up the branch heads
> beyond repair.

huh.  The impression I got from here
http://stackoverflow.com/questions/949314/how-to-retrieve-the-hash-for-the-current-commit-in-git
was that git rev-parse got me the abcd1234 hash.

> git log "--since=1 year ago" "--until=9 months ago"

all I want is the commit hash, though.  I suppose I could pipe
that through git log ... | head -n 1 | | cut -f 2, but that would
be a pain.  I need a single abcd1234 (which corresponds to the
commit approximately 3 months ago) to feed to gitstats; I don't
want a list of committishes.

I've managed to get this far:
  git log "--since=1 year ago" --pretty=format:'%H' -n 1
but that appears to show the latest commit.  Adding --reverse
doesn't work.  :(

I suppose I could add something like
  "--since=364 days ago" "--until=362 days ago"
but then it might break if there was no update exactly 363 days
ago.

Cheers,
- Graham

_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to