Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Jun 2025 06:09:32 +0100
From:      Jamie Landeg-Jones <jamie@catflap.org>
To:        sgk@troutmask.apl.washington.edu, freebsd-current@FreeBSD.org
Subject:   Re: drm panic after new world
Message-ID:  <202506030509.55359WbR093262@donotpassgo.dyslexicfish.net>
In-Reply-To: <aD4nRhiexw1m7iUS@troutmask.apl.washington.edu>
References:  <aDi-PhLtvicg9Bbz@troutmask.apl.washington.edu> <aDjThAnfAfJB4KE7@troutmask.apl.washington.edu> <aD4nRhiexw1m7iUS@troutmask.apl.washington.edu>

index | next in thread | previous in thread | raw e-mail

> How does one use dates to checkout a particular head?
> If I'm at the top of HEAD and need to got back to
> mid-february, what's the easiest option for performing
> a bisection by hand?

git rev-list -1 main '--before=2025-02-17'

This will give you the hash of the latest commit before the specified
date.

I'd use a little script something like this:

#!/bin/sh

[ -d src/.git ] || git clone --single-branch https://git.freebsd.org/src.git
cd src || exit 1
commit="$(git rev-list -1 main --before="$1")"
git checkout "$commit"

Then if you call it (say) gitbydate, you can use:

gitbydate 2025-02-17
gitbydate 2025-02-12

etc...

Cheers, Jamie


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506030509.55359WbR093262>