Why does the Go project's commit history date back to 1972?

xuanbao · · 480 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Type <code>git log</code>, hit &#34;End&#34;, and you&#39;ll see these four commits:</p> <pre><code>commit d82b11e4a46307f1f1415024f33263e819c222b8 Author: Brian Kernighan &lt;bwk@research.att.com&gt; Date: Fri Apr 1 02:03:04 1988 -0500 last-minute fix: convert to ANSI C R=dmr DELTA=3 (2 added, 0 deleted, 1 changed) commit 0744ac969119db8a0ad3253951d375eb77cfce9e Author: Brian Kernighan &lt;research!bwk&gt; Date: Fri Apr 1 02:02:04 1988 -0500 convert to Draft-Proposed ANSI C R=dmr DELTA=5 (2 added, 0 deleted, 3 changed) commit 0bb0b61d6a85b2a1a33dcbc418089656f2754d32 Author: Brian Kernighan &lt;bwk&gt; Date: Sun Jan 20 01:02:03 1974 -0400 convert to C R=dmr DELTA=6 (0 added, 3 deleted, 3 changed) commit 7d7c6a97f815e9279d08cfaea7d5efb5e90695a8 Author: Brian Kernighan &lt;bwk&gt; Date: Tue Jul 18 19:05:45 1972 -0500 hello, world R=ken DELTA=7 (7 added, 0 deleted, 0 changed) </code></pre> <p>After these four commits, the repository contains only one thing: a source file <code>src/pkg/debug/macho/testdata/hello.c</code>, which is a C Hello World program. The next commit is by Robert Griesemer in 2008.</p> <p>Why did the Go creators start their work on top of some Hello World project by Kernighan? Why did he keep a Hello World project for sixteen years? If he did, how could anything he did to it be &#34;last-minute&#34;? How and why was this information imported into git? I have so many questions.</p> <hr/>**评论:**<br/><br/>ifuporg: <pre><p>It is a cute joke. You can manipulate commit dates easily with <code>git commit --date &#34;Tue Jul 18 19:05:45 1972&#34; --author &#34;BK &lt;bwk&gt;&#34;</code></p></pre>stillalone: <pre><p>Damn, I wish I had known this several years ago. The company I work for ported a bunch of repos from svn to git. The guy who did the porting didn&#39;t bother with this and all the commits ended up having his name and the date he did the transfer.</p></pre>isxek: <pre><p>I&#39;m no DVCS expert, but AFAIK, both Git and Mercurial have extensions that should have been able to handle that better. IIRC, Git has <code>git-svn</code> for this, and Mercurial has <code>hgsubversion</code> and the <code>convert</code> extensions.</p> <p>I mentioned this because at one point I had played with both VCS&#39;s to convert the flagship repositories of a company I previously worked with from SVN to either Git or Hg.</p></pre>huitzitzilin: <pre><p>I&#39;ve used git-svn before too and managed to keep the commit history tidy</p></pre>isxek: <pre><p>It&#39;s pretty handy not just for converting repositories - it can also be used as a Subversion client. (I think even Linus Torvalds mentioned people doing this as early as <a href="https://www.youtube.com/watch?v=4XpnKHJAok8" rel="nofollow">that Google talk about Git</a>.)</p></pre>scarhill: <pre><p>Another option for conversions is <a href="/u/esr" rel="nofollow">/u/esr</a>&#39;s Reposurgeon: <a href="https://gitlab.com/esr/reposurgeon" rel="nofollow">https://gitlab.com/esr/reposurgeon</a></p></pre>Twirrim: <pre><p>WTF. There are even CLI utilities that do the migration for you, including full commit history.</p></pre>BeechM: <pre><p>It&#39;s not too late if you&#39;ve got the old SVN repo and you&#39;re willing to get fast and loose with commit history.</p></pre>sh41: <pre><p>Get loose with it.</p></pre>SSoreil: <pre><p>Because that&#39;s the Lineage of Go, there have been some talks on this by (I think) Robert Griesemer. You should be able to find them on YouTube somewhere.</p></pre>sh41: <pre><blockquote> <p>If he did, how could anything he did to it be &#34;last-minute&#34;?</p> </blockquote> <p>Note that two of the commits were done on April 1, so you just fell for an April Fool joke.</p></pre>s4n_rd: <pre><p>may be this indicate &#34;go project started as a better c&#34; B -&gt; C -&gt; ANSI C -&gt; Go</p></pre>vadviktor: <pre><p>LOL, Git before Linux? XD</p></pre>TotesMessenger: <pre><p>I&#39;m a bot, <em>bleep</em>, <em>bloop</em>. Someone has linked to this thread from another place on reddit:</p> <ul> <li>[<a href="/r/git" rel="nofollow">/r/git</a>] <a href="https://np.reddit.com/r/git/comments/5xqecf/why_does_the_go_projects_commit_history_date_back/" rel="nofollow">Why does the Go project&#39;s commit history date back to 1972? • r/golang</a></li> </ul> <p><a href="#footer" rel="nofollow"></a><em><sup>If you follow any of the above links, please respect the rules of reddit and don&#39;t vote in the other threads.</sup> <sup>(<a href="/r/TotesMessenger" rel="nofollow">Info</a></sup> <sup>/</sup> <sup><a href="/message/compose?to=/r/TotesMessenger" rel="nofollow">Contact</a>)</sup></em></p> <p><a href="#bot" rel="nofollow"></a></p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

480 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传