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

xuanbao · 2017-03-05 23:00:09 · 669 次点击    
这是一个分享于 2017-03-05 23:00:09 的资源,其中的信息可能已经有所发展或是发生改变。

Type git log, hit "End", and you'll see these four commits:

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)

After these four commits, the repository contains only one thing: a source file src/pkg/debug/macho/testdata/hello.c, which is a C Hello World program. The next commit is by Robert Griesemer in 2008.

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.


评论:

ifuporg:

It is a cute joke. You can manipulate commit dates easily with git commit --date "Tue Jul 18 19:05:45 1972" --author "BK "

stillalone:

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.

isxek:

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 git-svn for this, and Mercurial has hgsubversion and the convert extensions.

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.

huitzitzilin:

I've used git-svn before too and managed to keep the commit history tidy

isxek:

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 that Google talk about Git.)

scarhill:

Another option for conversions is /u/esr's Reposurgeon: https://gitlab.com/esr/reposurgeon

Twirrim:

WTF. There are even CLI utilities that do the migration for you, including full commit history.

BeechM:

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.

sh41:

Get loose with it.

SSoreil:

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.

sh41:

If he did, how could anything he did to it be "last-minute"?

Note that two of the commits were done on April 1, so you just fell for an April Fool joke.

s4n_rd:

may be this indicate "go project started as a better c" B -> C -> ANSI C -> Go

vadviktor:

LOL, Git before Linux? XD

TotesMessenger:

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / Contact)


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

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