From: Jonathan Nieder Date: Wed, 21 Jul 2010 01:05:39 GMT Subject: git name-rev for fun and profit (Re: [PATCH] t/: work around one-shot variable assignment with test_must_fail) Message-ID: <20100721010539.GF4282@burratino> In-Reply-To: Ævar Arnfjörð Bjarmason wrote: > As an aside, how do you make these 61-commits-after-rc0 commit ids. Is > there a sha1->that tool that I haven't spotted? GIT_PAGER_IN_USE=1 git log --all-match --grep=shell --grep=export | git -p name-rev --tags --stdin v1.5.6-rc0~61 is 61 commits before rc0 (well, the 61st-generation grandparent using the first parent where there is a choice). The distinction matters because “61 commits _after_ 1.5.6-rc0” is not well-defined. If you want the latter sort of description anyway, ‘git describe’ might help.