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

Re: Will git have a baseline feature or something alike?

From
David Brown <git@davidb.org>
Date
Mar 1, 2008, 20:43 UTC
Message-ID
<20080301204352.GA862@old.davidb.org>
In-Reply-To
<8384AA89-4ECF-4BB8-8A3B-6A656F2D2903@orakel.ntnu.no>
On Sat, Mar 01, 2008 at 06:30:13PM +0100, Eyvind Bernhardsen wrote:
Show 6 quoted lines
> Okay, as a git n00b I'm probably on completely the wrong track, but if you 
> made a git repository out of a kernel tarball (cd linux-2.6.24 && git init 
> && git add .) and then did a shallow fetch from kernel.org into that 
> repository, wouldn't the blobs you added get reused (assuming the tarball 
> you downloaded was fairly recent), thus reducing the amount of data fetch 
> has to transfer?

Git uses the commit history to determine what objects you might already have. For normal use cases, this works quite well, however in this instance it doesn't help at all. You'll ending up transferring everything, even for objects you already have. Git will detect that you already have the object only after the transfer.

Think about it, though. In order to do this generally, the client would have to send the hash of every object it has. Perhaps this would be a useful thing to do when git detects that there are no common commits, but it would only really help the case of pulling from multiple repos that manage the same files with separate histories.

There are some cases where this happens, such as when changes go through another revision control system, but probably not normal usage.

David
Previous: Shawn O. Pearce
Message 16 of 16 in “Will git have a baseline feature or something alike?”
  1. eric miaoFeb 29, 2008
  2. SeanFeb 29, 2008
  3. Karl HasselströmFeb 29, 2008
  4. Jakub NarebskiFeb 29, 2008
  5. Sam VilainMar 1, 2008
  6. Jakub NarebskiMar 1, 2008
  7. Sam VilainMar 1, 2008
  8. Jan HudecMar 2, 2008
  9. Martin LanghoffMar 2, 2008
  10. eric miaoMar 1, 2008
  11. Nguyen Thai Ngoc DuyMar 1, 2008
  12. Jakub NarebskiMar 1, 2008
  13. Eyvind BernhardsenMar 1, 2008
  14. Jakub NarebskiMar 1, 2008
  15. Shawn O. PearceMar 2, 2008
  16. David BrownMar 1, 2008

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.