<p>Type <code>git log</code>, hit "End", and you'll see these four commits:</p>
<pre><code>commit d82b11e4a46307f1f1415024f33263e819c222b8
Author: Brian Kernighan <bwk@research.att.com>
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 <research!bwk>
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 <bwk>
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 <bwk>
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 "last-minute"? 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 "Tue Jul 18 19:05:45 1972" --author "BK <bwk>"</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'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'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'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've used git-svn before too and managed to keep the commit history tidy</p></pre>isxek: <pre><p>It'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>'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's not too late if you've got the old SVN repo and you'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'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 "last-minute"?</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 "go project started as a better c"
B -> C -> ANSI C -> Go</p></pre>vadviktor: <pre><p>LOL, Git before Linux? XD</p></pre>TotesMessenger: <pre><p>I'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'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'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
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传