CINXE.COM
LKML: Linus Torvalds: Re: more git updates..
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>LKML: Linus Torvalds: Re: more git updates..</title><link href="/css/message.css" rel="stylesheet" type="text/css" /><link href="/css/wrap.css" rel="alternate stylesheet" type="text/css" title="wrap" /><link href="/css/nowrap.css" rel="stylesheet" type="text/css" title="nowrap" /><link href="/favicon.ico" rel="shortcut icon" /><script src="/js/simple-calendar.js" type="text/javascript"></script><script src="/js/styleswitcher.js" type="text/javascript"></script><link rel="alternate" type="application/rss+xml" title="lkml.org : last 100 messages" href="/rss.php" /><link rel="alternate" type="application/rss+xml" title="lkml.org : last messages by Linus Torvalds" href="/groupie.php?aid=1" /><!--Matomo--><script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(["setDoNotTrack", true]); _paq.push(["disableCookies"]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//m.lkml.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '1']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script><!--End Matomo Code--></head><body onload="es.jasper.simpleCalendar.init();" itemscope="itemscope" itemtype="http://schema.org/BlogPosting"><table border="0" cellpadding="0" cellspacing="0"><tr><td width="180" align="center"><a href="/"><img style="border:0;width:135px;height:32px" src="/images/toprowlk.gif" alt="lkml.org" /></a></td><td width="32">聽</td><td class="nb"><div><a class="nb" href="/lkml"> [lkml]</a> 聽 <a class="nb" href="/lkml/2005"> [2005]</a> 聽 <a class="nb" href="/lkml/2005/4"> [Apr]</a> 聽 <a class="nb" href="/lkml/2005/4/9"> [9]</a> 聽 <a class="nb" href="/lkml/last100"> [last100]</a> 聽 <a href="/rss.php"><img src="/images/rss-or.gif" border="0" alt="RSS Feed" /></a></div><div>Views: <a href="#" class="nowrap" onclick="setActiveStyleSheet('wrap');return false;">[wrap]</a><a href="#" class="wrap" onclick="setActiveStyleSheet('nowrap');return false;">[no wrap]</a> 聽 <a class="nb" href="/lkml/mheaders/2005/4/9/136" onclick="this.href='/lkml/headers'+'/2005/4/9/136';">[headers]</a>聽 <a href="/lkml/bounce/2005/4/9/136">[forward]</a>聽 </div></td><td width="32">聽</td></tr><tr><td valign="top"><div class="es-jasper-simpleCalendar" baseurl="/lkml/"></div><div class="threadlist">Messages in this thread</div><ul class="threadlist"><li class="root"><a href="/lkml/2005/4/9/103">First message in thread</a></li><li><a href="/lkml/2005/4/9/109">Linus Torvalds</a><ul><li><a href="/lkml/2005/4/9/110">Linus Torvalds</a><ul><li class="origin"><a href="/lkml/2005/4/9/155">Linus Torvalds</a><ul><li><a href="/lkml/2005/4/9/155">Petr Baudis</a><ul><li><a href="/lkml/2005/4/10/72">Petr Baudis</a></li></ul></li><li><a href="/lkml/2005/4/10/25">Christopher Li</a><ul><li><a href="/lkml/2005/4/10/41">Ralph Corderoy</a></li><li><a href="/lkml/2005/4/10/125">Paul Jackson</a></li><li><a href="/lkml/2005/4/11/103">(H. Peter Anvin)</a></li></ul></li><li><a href="/lkml/2005/4/11/74">Ingo Molnar</a><ul><li><a href="/lkml/2005/4/11/110">Paul Jackson</a></li></ul></li><li><a href="/lkml/2005/4/12/32">David Eger</a><ul><li><a href="/lkml/2005/4/12/67">Petr Baudis</a></li></ul></li></ul></li></ul></li><li><a href="/lkml/2005/4/9/150">Paul Jackson</a><ul><li><a href="/lkml/2005/4/9/152">Paul Jackson</a></li></ul></li><li><a href="/lkml/2005/4/9/151">Paul Jackson</a></li><li><a href="/lkml/2005/4/10/8">Junio C Hamano</a><ul><li><a href="/lkml/2005/4/10/13">Christopher Li</a><ul><li><a href="/lkml/2005/4/10/18">Junio C Hamano</a><ul><li><a href="/lkml/2005/4/10/23">Petr Baudis</a></li><li><a href="/lkml/2005/4/10/27">Christopher Li</a></li></ul></li><li><a href="/lkml/2005/4/10/21">Wichert Akkerman</a></li><li><a href="/lkml/2005/4/10/22">Petr Baudis</a><ul><li><a href="/lkml/2005/4/10/28">Christopher Li</a></li></ul></li></ul></li><li><a href="/lkml/2005/4/10/37">Rutger Nijlunsing</a></li><li><a href="/lkml/2005/4/10/70">Linus Torvalds</a><ul><li><a href="/lkml/2005/4/10/76">Rutger Nijlunsing</a></li><li><a href="/lkml/2005/4/10/118">Paul Jackson</a><ul><li><a href="/lkml/2005/4/10/142">Linus Torvalds</a></li></ul></li></ul></li></ul></li><li><a href="/lkml/2005/4/10/44"> tony.luck@intel ...</a><ul><li><a href="/lkml/2005/4/10/71">Linus Torvalds</a><ul><li><a href="/lkml/2005/4/12/306">Helge Hafting</a></li></ul></li><li><a href="/lkml/2005/4/10/103">Paul Jackson</a><ul><li><a href="/lkml/2005/4/10/165">Bernd Eckenfels</a><ul><li><a href="/lkml/2005/4/11/50">Anton Altaparmakov</a></li></ul></li></ul></li></ul></li></ul></li></ul></td><td width="32" rowspan="2" class="c" valign="top"><img src="/images/icornerl.gif" width="32" height="32" alt="/" /></td><td class="c" rowspan="2" valign="top" style="padding-top: 1em"><table><tr><td><table><tr><td class="lp">Date</td><td class="rp" itemprop="datePublished">Sat, 9 Apr 2005 16:31:10 -0700 (PDT)</td></tr><tr><td class="lp">From</td><td class="rp" itemprop="author">Linus Torvalds <></td></tr><tr><td class="lp">Subject</td><td class="rp" itemprop="name">Re: more git updates..</td></tr></table></td><td></td></tr></table><pre itemprop="articleBody"><br /><br />On Sat, 9 Apr 2005, Linus Torvalds wrote:<br />> <br />> Actually, I guess I wouldn't have to change the format. I could just <br />> extend the existing "tree" object to be able to point to other trees, and <br />> that's it.<br /><br />Done, and pushed out. The current git.git repository seems to do all of <br />this correctly.<br /><br />NOTE! This means that each "tree" file basically tracks just a single<br />directory. The old style of "every file in one tree file" still works, but <br />fsck-cache will warn about it. Happily, the git archive itself doesn't <br />have any subdirectories, so git itself is not impacted by it.<br /><br />Now, this means that I should add a "recusive" option to "tree-diff", but <br />I haven't done so yet. So right now if I change the top-level Makefile,<br />_and_ change kernel/exit.c, then the "tree diff" between the two commit <br />trees ends up looking like:<br /><br /> torvalds@ppc970:~/lx-test/linux-2.6.12-rc2> diff-tree 7bec1223736d7e02c755e9a365984b3cbfa1e6e9 d64817f809a60cd960d3078ae91b4d19cb649501 | tr '\0' '\n'<br /> <100644 e1e7f7430c0297f22042cff58da5ca73ef121b95 Makefile<br /> >100644 8ee21134577e98fb642dffc5b797a0121645c543 Makefile<br /> <40000 2239383d00ae746f5e79ceccf8ac3fbca62f949d kernel<br /> >40000 a8fad219cb78a6b6a05a10f8643d615fefc8160f kernel<br /><br />ie it shows that the Makefile blob has changed, and the kernel directory <br />has changed. You then need to recurse into the kernel tree to see what the <br />changes were there:<br /><br /> torvalds@ppc970:~/lx-test/linux-2.6.12-rc2> diff-tree 2239383d00ae746f5e79ceccf8ac3fbca62f949d a8fad219cb78a6b6a05a10f8643d615fefc8160f | tr '\0' '\n'<br /> <100644 1a50b58453679b6fee8de4f744f4befc39397bb1 exit.c<br /> >100644 e8df1325bf25816827a1a64404ad533a97bfdae2 exit.c<br /><br />but it clearly all seems to work. And it means that a subdirectory that <br />didn't change at all (the common case) will be able to re-use the old sha1 <br />file when you create a tree (this may in fact make "diff-tree" much less <br />important, since now it tends to handle objects that are just a few kB in <br />size, rather than almost a megabyte.<br /><br />So in this case, the "commit cost" of changing two files was two small <br />tree files (1468 and 679 bytes respectively for the kernel/ and top-level <br />directory) and the commit file itself (251 bytes). In addition to the <br />actual data files that were changed, of course.<br /><br />Goodie. Big difference between that and the 460kB of the old monolithic<br />tree file.<br /><br /> Linus<br />-<br />To unsubscribe from this list: send the line "unsubscribe linux-kernel" in<br />the body of a message to majordomo@vger.kernel.org<br />More majordomo info at <a href="http://vger.kernel.org/majordomo-info.html">http://vger.kernel.org/majordomo-info.html</a><br />Please read the FAQ at <a href="http://www.tux.org/lkml/">http://www.tux.org/lkml/</a><br /><br /></pre></td><td width="32" rowspan="2" class="c" valign="top"><img src="/images/icornerr.gif" width="32" height="32" alt="\" /></td></tr><tr><td align="right" valign="bottom"> 聽 </td></tr><tr><td align="right" valign="bottom">聽</td><td class="c" valign="bottom" style="padding-bottom: 0px"><img src="/images/bcornerl.gif" width="32" height="32" alt="\" /></td><td class="c">聽</td><td class="c" valign="bottom" style="padding-bottom: 0px"><img src="/images/bcornerr.gif" width="32" height="32" alt="/" /></td></tr><tr><td align="right" valign="top" colspan="2"> 聽 </td><td class="lm">Last update: 2009-11-18 23:46 聽聽 [from the cache]<br />漏2003-2020 <a href="http://blog.jasper.es/"><span itemprop="editor">Jasper Spaans</span></a>|hosted at <a href="https://www.digitalocean.com/?refcode=9a8e99d24cf9">Digital Ocean</a> and my Meterkast|<a href="http://blog.jasper.es/categories.html#lkml-ref">Read the blog</a></td><td>聽</td></tr></table><script language="javascript" src="/js/styleswitcher.js" type="text/javascript"></script></body></html>