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

Re: Efficient retrieval of commit log info

From
Nicolas Pitre <nico@cam.org>
Date
Dec 12, 2007, 15:04 UTC
Message-ID
<alpine.LFD.0.99999.0712121001430.555@xanadu.home>
In-Reply-To
<Pine.LNX.4.64.0712121453150.27959@racer.site>
On Wed, 12 Dec 2007, Johannes Schindelin wrote:
Show 29 quoted lines
> Hi,
> 
> On Wed, 12 Dec 2007, Eirik Bj?rsn?s wrote:
> 
> > I'm developing a piece of software that grabs logs from various types of 
> > SCMs and presents (hopefully) useful information about the history.
> > 
> > My current approach with Git is do a "git clone --n" and then parse the 
> > output of "git log". To check for updates I do a "git pull" followed by 
> > a new "git log".
> > 
> > This approach works fine, but cloning the whole repository just to get 
> > the change log seems like a somewhat inefficient use of bandwidth and 
> > storage.
> > 
> > What I would like to do is to fetch just the change log information
> > from the remote repository.
> > 
> > (Using the "CVS done right" tool I can do this with: "svn log --xml -v
> > -r<last, HEAD> http://svn.example.com/")
> > 
> > I haven't found a way to do this using the Git command line tools.
> 
> It is not possible to get just the metadata.  Remember, svn can do it only 
> since the repository is purely remote.  And git is a SCM (source code 
> management system), not a CMV (commit metadata viewer).
> 
> You might be able to cobble up something that works accessing gitweb, but 
> it might be even more inefficient.

On the other hand, this is pretty trivial to extend the protocol so only commit objects are transferred. Using 'git log' on the client side would work, as long as you don't use any of the content walking options.

Nicolas
Previous: Johannes SchindelinNext: Eirik Bjørsnøs
Message 3 of 8 in “Efficient retrieval of commit log info”
  1. Eirik BjørsnøsDec 12, 2007
  2. Johannes SchindelinDec 12, 2007
  3. Nicolas PitreDec 12, 2007
  4. Eirik BjørsnøsDec 12, 2007
  5. Jon SmirlDec 12, 2007
  6. Eirik BjørsnøsDec 12, 2007
  7. Santi BéjarDec 12, 2007
  8. Linus TorvaldsDec 12, 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.