git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How do I specify a revision for "git blame" by date?

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Jun 14, 2012, 10:19 UTC
Message-ID
<m2sjdynqlf.fsf@igel.home>
In-Reply-To
<4fda029d.g99uVull9jgguc/Y%perryh@pluto.rain.com>
perryh@pluto.rain.com writes:
Show 12 quoted lines
> How do I get "git blame" to operate "as of" a particular date in
> the past, without having to manually look up the corresponding
> SHA1 using "git rev-list"?  For example, I can get a report as of
> 2011-12-29 by doing something like:
>
>   $ git rev-list --all --date-order --format="%h %ai" .
>   ...
>   7c69106 2012-01-03 ...
>   b4227af 2011-12-27 ...
>   ...
>
>   $ git blame <file> b4227af
You can use any rev-list option, so --until=2011-12-27 should work.
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Previous: perryh@pluto.rain.comNext: Junio C Hamano
Message 7 of 9 in “How do I specify a revision for "git blame" by date?”
  1. perryh@pluto.rain.comJun 14, 2012
  2. Thomas RastJun 14, 2012
  3. perryh@pluto.rain.comJun 15, 2012
  4. Jeff KingJun 15, 2012
  5. Junio C HamanoJun 15, 2012
  6. perryh@pluto.rain.comJun 16, 2012
  7. Andreas SchwabJun 14, 2012
  8. Junio C HamanoJun 14, 2012
  9. perryh@pluto.rain.comJun 15, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.