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

Re: [PATCH] cvsimport move over to using git for each ref to read refs

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 20, 2006, 11:00 UTC
Message-ID
<200609201300.09266.jnareb@gmail.com>
In-Reply-To
<4511173D.7020702@shadowen.org>
Andy Whitcroft wrote:
Show 20 quoted lines
> Jakub Narebski wrote:
> > Andy Whitcroft wrote:
> > 
> >> +       open(H, "git-for-each-ref --format='%(objectname) %(refname)'|") or
> > 
> > By the way, this is equivalent to using "git-show-ref" introduced by Linus.
> > But if you want commit timestamp
> > 
> >> cvsimport opens all of the files in $GIT_DIR/refs/heads and reads
> >> out the sha1's in order to work out what time the last commit on
> >> that branch was made (in CVS) thus allowing incremental updates.
> > 
> > you can use it in --format as well.
> 
> Unfortuantly, for-each-ref only offers us the textual version of this
> information not the numeric offset from the epoch which is what
> cvsimport is after.
> 
> I guess we could teach for-each-ref to output this as well?  Perhaps
> something like authorstamp?
Or authorepoch. 

I thought about following rpm idea of format modifiers, like authorepoch:date for strftime(3) "%c" format or commiterepoch:day for strftime(3) "%a %b %d %Y" format.

Feel free to provide patches ;-)
-- 
Jakub Narebski
Poland
Previous: Andy WhitcroftNext: Junio C Hamano
Message 6 of 15 in “cvsimport move over to using git for each ref to read refs”
  1. cvsimport move over to using git for each ref to read refsAndy Whitcroft, Sep 20, 2006
  2. Jakub NarebskiSep 20, 2006
  3. Andy WhitcroftSep 20, 2006
  4. 1/2 for each ref add a raw timestamp field typeAndy Whitcroft, Sep 20, 2006
  5. 2/2 cvsimport move over to using git for each ref to read refs V2Andy Whitcroft, Sep 20, 2006
  6. Jakub NarebskiSep 20, 2006
  7. Junio C HamanoSep 20, 2006
  8. Andy WhitcroftSep 20, 2006
  9. cvsimport move over to using git for each ref to read refs V3Andy Whitcroft, Sep 20, 2006
  10. Junio C HamanoSep 20, 2006
  11. Andy WhitcroftSep 20, 2006
  12. Junio C HamanoSep 20, 2006
  13. Junio C HamanoSep 20, 2006
  14. Andy WhitcroftSep 21, 2006
  15. Junio C HamanoSep 22, 2006

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.