Hi Greg, On 2026-02-25T15:46:28-0800, Greg Kroah-Hartman wrote: [...] > > Secondarily, it helps with the ID, in case it becomes ambiguous. But > > I started using it for the human part of it. > > Our ids are not ambiguous. Our "problem" is people putting git ids in > the logs that are not valid git ids. Just happened again today as we > are "human". Putting the date in there would not help with that very > real problem we have today at all.
It would help locate the commit it refers to. If you have a commit
date, you know that if it was rebased, the date can only increase. So,
instead of having to search exclusively by subject, you can limit your
search to dates no older than the date from the Fixes tag.
Let's say we want to locate
bogus-hash (2025-11-21; "bug: Add BUG_FORMAT_ARGS infrastructure")
We can first of all check if maybe there's a typo in the hash (maybe
the first character is missing, due to a cut/paste accident).
$ git log --oneline --before 2025-11-22 --after 2025-11-20 \
| grep BUG_FORMAT_ARGS;
5c47b7f3d1a9 bug: Add BUG_FORMAT_ARGS infrastructure
But even if the date was wrong. Let's say someone used a reference to
a commit that got rebased a year later, as the case you stated.
old-hash (2025-01-21; "bug: Add BUG_FORMAT_ARGS infrastructure")
We can search by date something that looks similar. We know the date
can't be older than that, if it wasrebased.
$ git log --oneline --after 2025-11-20 | grep infrastructure
cb2dc6d2869a can: Kconfig: select CAN driver infrastructure by default
93d7a7ed0734 netfilter: flowtable: move path discovery infrastructure
to its own file
23343b6b09ac sched/mmcid: Introduce per task/CPU ownership
infrastructure
775465fd26a3 lib/test_hmm: add zone device private THP test
infrastructure
99e4e1028337 RDMA/bng_re: Add basic debugfs infrastructure
4f830cd8d7fe RDMA/bng_re: Add infrastructure for enabling Firmware
channel
5c47b7f3d1a9 bug: Add BUG_FORMAT_ARGS infrastructure
d292dbb5640c bug: Add BUG_FORMAT infrastructure
So, we'd start looking at the tail of that list (assuming the rebase was
close to the commit date), and depart from that as necessary. In this
case, we find it as the second commit.
On the other hand, if you have no date, you must look at the entire
git-log(1), which is a lot more work.
> thanks,
>
> greg k-h
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es>
signature.asc
Description: PGP signature

