Date: Wed, 30 Dec 2020 17:04:17 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= <uqs@freebsd.org> To: monochrome <monochrome@twcny.rr.com> Cc: freebsd-current@freebsd.org Subject: Re: git and the loss of revision numbers Message-ID: <X%2BylASvJe54Zpu2m@acme.spoerlein.net> In-Reply-To: <1d1e2003-0cc1-6e67-0ceb-f0fcba03f8f7@twcny.rr.com> References: <54116640-E6A1-4C53-9D7E-4384F942628E@ellael.org> <8ABAC674-89AA-47BE-996C-4DF6E7713F21@ellael.org> <53dd689b-2401-8e90-f332-50c60c549c2e@FreeBSD.org> <CAPyFy2DW0YDUK%2Bkir2H_e8LVT-P-kQ0PMmKQO6m%2B016Wb=Hd0A@mail.gmail.com> <1d1e2003-0cc1-6e67-0ceb-f0fcba03f8f7@twcny.rr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2020-12-28 at 19:38:05 -0500, monochrome wrote: >what would be the git command for reverting source to a previous version >using these numbers? for example, with svn and old numbers: >svnlite update -r367627 /usr/src > >this is needed often when it blows up for someone tracking current You need to fetch the git notes, then you can grep them for the SVN rev you're looking for. $ git fetch origin "refs/notes/*:refs/notes/*" && git fetch $ git checkout `git log --format=%h --notes --grep='revision=367627$' main` It's git commit 9aa6d792b549 for reference. >On 12/28/20 11:27 AM, Ed Maste wrote: >> On Mon, 28 Dec 2020 at 07:08, Renato Botelho <garga@freebsd.org> wrote: >>> >>> FreeBSD bast.garga.net.br 13.0-CURRENT FreeBSD 13.0-CURRENT #19 >>> 3cc0c0d66a0-c255241(main)-dirty: >>> ^ >>> This is an incremental counter of commits >> >> Also, uqs@ recently fixed an issue in newvers.sh (including the final, >> non-updating svn revision) and reordered the information. An example >> of the new format: >> >> main-c255126-gb81783dc98e6-dirty >> \ \ \ \ >> \ \ \ local modifications >> \ \ hash >> \ commit count >> branch Note, the `g` in there is by design, it's the format that git-describe will barf out. hth Uli
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?X%2BylASvJe54Zpu2m>