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

Re: Listing files in order they are changed

From
Peter Krefting <peter@softwolves.pp.se>
Date
Sep 24, 2010, 07:59 UTC
Message-ID
<alpine.DEB.2.00.1009240855080.31704@ds9.cixit.se>
In-Reply-To
<20100923203814.GA10951@sigill.intra.peff.net>
Jeff King:
> git log --pretty=format: --name-only |
>  grep . |
>  perl -ne 'print unless $seen{$_}++'
Nice one!
That made me come up with this, which shows a timestamp next to each file:
   git log --pretty=format:/%ai --name-only |
     grep . |
 	perl -ne 'if (m(^/(.*))) { $date = $1; } else { print "$date $_" unless $seen{$_}++; }'
(change %ai into whatever timestamp you want to show)

Mutating that into something that calls "touch" might be useful for those of us who would like an initial check-out to have last-modified times like the ones CVS would give you.

-- 
\\// Peter - http://www.softwolves.pp.se/
Previous: Jeff KingNext: Jakub Narebski
Message 3 of 7 in “Listing files in order they are changed”
  1. Parag KalraSep 23, 2010
  2. Jeff KingSep 23, 2010
  3. Peter KreftingSep 24, 2010
  4. Jakub NarebskiSep 23, 2010
  5. Sverre RabbelierSep 23, 2010
  6. Jakub NarebskiSep 23, 2010
  7. Sverre RabbelierSep 23, 2010

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.