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

Re: [PATCH] git-svn: Added 'find-rev' command

From
EWEric Wong <normalperson@yhbt.net>
Date
Apr 28, 2007, 10:50 UTC
Message-ID
<20070428105016.GA11271@muzzle>
In-Reply-To
<7vbqh9kov9.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 12 quoted lines
> Eric Wong <normalperson@yhbt.net> writes:
> 
> > Adam Roben <aroben@apple.com> wrote:
> >> This patch adds a new 'find-rev' command to git-svn that lets you easily
> >> translate between SVN revision numbers and git tree-ish.
> >
> > Looks useful.
> >
> > Acked-by: Eric Wong <normalperson@yhbt.net>
> 
> But looks quite wasteful.  Why not run "rev-list -v" or
> something instead of running cat-file on revision one-by-one?

Didn't know about "rev-list -v", but I just checked and it still has the limited-size buffer that --pretty=raw has.

"git-svn log" only runs cat-file if it can't find a git-svn-id: line at the bottom. (I used log --abbrev-commit --pretty=raw).

Sorry about the premature Ack, I hadn't had my coffee yet at that point (and now I'm half awake :x)

Adam:
However, since we're not fetching ranges...

You can do $gs->rev_db_get($rev_nr) to easily find a commit given a revision. Bonus points if this works independently of the current HEAD so you can look up revision numbers on different branches. (git-svn log should be made to support this, too)

-- 
Eric Wong
Previous: Junio C HamanoNext: Adam Roben
Message 4 of 5 in “git-svn: Added 'find-rev' command”
  1. git-svn: Added 'find-rev' commandAdam Roben, Apr 27, 2007
  2. Eric WongApr 27, 2007
  3. Junio C HamanoApr 28, 2007
  4. Eric WongApr 28, 2007
  5. Adam RobenApr 28, 2007

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.