Go 开发团队技术 leader Russ Cox 发文分享 Go 的版本控制历史

简介: Go 开发团队技术 leader Russ Cox 发文分享 Go 的版本控制历史

Russ Cox (rsc)发现每隔一段时间总会有人表示Go 的首次 commit 是在 1972 年 。rsc认为这种说法显然是非常愚蠢的,并分享了关于 Go 版本控制的更多有趣历史。例如: Go 真正首次 commit 是第 5 个 commit,此前的都是假 commit。

% git log --reverse --stat

commit 7d7c6a97f815e9279d08cfaea7d5efb5e90695a8

Author:     Brian Kernighan <bwk>

AuthorDate: Tue Jul 18 19:05:45 1972 -0500

Commit:     Brian Kernighan <bwk>

CommitDate: Tue Jul 18 19:05:45 1972 -0500


   hello, world


   R=ken

   DELTA=7  (7 added, 0 deleted, 0 changed)


src/pkg/debug/macho/testdata/hello.b | 7 +++++++

1 file changed, 7 insertions(+)


...

据rsc 所言,Go 使用过的版本控制系统共有 4 个:Subversion、Perforce、Mercurial 、Git。

commit18c5b488a3b2e218c0e0cf2a7d4820d9da93a554

Author:     Robert Griesemer <gri@golang.org>

AuthorDate: Sun Mar 220:47:342008 -0800

Commit:     Robert Griesemer <gri@golang.org>

CommitDate: Sun Mar 220:47:342008 -0800


  Go spec starting point.


  SVN=111041


doc/go_spec | 1197 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

1 file changed, 1197 insertions(+)

Subversion

Go 开始使用 Subversion 是作为评估Subversion在Google内部推广使用的可行性实验,虽然最后没有选择 Subversion,但正是 Go 真正首次 commit提交到了 SVN 服务器。

Perforce

2008 年 7 月,Go 在 Subversion提交了最后一次 commit 。此后转向 Perforce,Go 开源前的大部分开发工作都是在 Perforce 上进行。

下面是 Go 迁移到 Perforce 的首次 commit:

commit777ee7163bba96f2c9b3dfe135d8ad4ab837c062

Author:     Rob Pike <r@golang.org>

AuthorDate: Mon Jul 2116:18:042008 -0700

Commit:     Rob Pike <r@golang.org>

CommitDate: Mon Jul 2116:18:042008 -0700


  map delete


  SVN=128258


doc/go_lang.txt | 6 ++++++

1 file changed, 6 insertions(+)


commit05caa7f82030327ccc9ae63a2b0121a029286501

Author:     Rob Pike <r@golang.org>

AuthorDate: Mon Jul 2117:10:492008 -0700

Commit:     Rob Pike <r@golang.org>

CommitDate: Mon Jul 2117:10:492008 -0700


  help management of empty pkg and lib directories in perforce


  R=gri

  DELTA=4  (4 added, 0 deleted, 0 changed)

  OCL=13328

  CL=13328


lib/place-holder      | 2 ++

pkg/place-holder      | 2 ++

src/cmd/gc/mksys.bash | 0

3 files changed, 4 insertions(+)

在转向到 Perforce 后,引入了DELTA=, OCL= 和 CL= 这些标签。并且许多其他变更具有相同的OCL=和CL=,因为它们是在单个Perforce命令中创建和提交的,没有经过审核。

commit c1f5eda7a2465dae196d1fa10baf6bfa9253808a

Author:     Rob Pike <r@golang.org>

AuthorDate: Mon Jul 2118:06:392008 -0700

Commit:     Rob Pike <r@golang.org>

CommitDate: Mon Jul 2118:06:392008 -0700


  change date


  OCL=13331

  CL=13331


doc/go_lang.txt | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

Mercurial

2009 年 10 月,Go 的版本控制系统迁移到Mercurial,作为11月开源Go准备工作的一部分。

commit942d6590d9005f89e971ed5af0374439a264a20e

Author:     Kai Backman <kaib@golang.org>

AuthorDate: Fri Oct 2311:03:162009 -0700

Commit:     Kai Backman <kaib@golang.org>

CommitDate: Fri Oct 2311:03:162009 -0700


  one more argsize fix. we were copying with the correct

  alignment but not enough (duh).


  R=rsc

  APPROVED=rsc

  DELTA=16  (13 added, 0 deleted, 3 changed)

  OCL=36020

  CL=36024


src/cmd/5g/ggen.c |  2 +-

test/arm-pass.txt | 17 +++++++++++++++--

2 files changed, 16 insertions(+), 3 deletions(-)


commit b74fd8ecb17c1959bbf2dbba6ccb8bae6bfabeb8

Author:     Kai Backman <kaib@golang.org>

AuthorDate: Fri Oct 2312:43:012009 -0700

Commit:     Kai Backman <kaib@golang.org>

CommitDate: Fri Oct 2312:43:012009 -0700


  fix build issue cause by transition to hg


  R=rsc

  http://go/go-review/1013012


src/make-arm.bash | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)

Git

从 2009 年 11 月一直到 2014 年末,由于 Google Code Project Hosting 即将关闭,Go 不得已寻找新的代码托管方案。在研究了几个选项后,最终选择使用 Gerrit Code Review, rsc 认为这是 一个非常棒的选择。

commit 94151eb2799809ece7e44ce3212aa3cbb9520849

Author:     Russ Cox <rsc@golang.org>

AuthorDate: Fri Dec521:33:072014-0500

Commit:     Russ Cox <rsc@golang.org>

CommitDate: Fri Dec521:33:072014-0500


   encoding/xml: remove SyntaxError.Byte


   It is unused. It was introduced in the CL that added InputOffset.

   I suspect it was an editing mistake.


   LGTM=bradfitz

   R=bradfitz

   CC=golang-codereviews

   https://golang.org/cl/182580043


src/encoding/xml/xml.go | 1 -

1 file changed, 1 deletion(-)


commit 258f53dee33b9055ea168cb186f8c076edee5905

Author:     David Symonds <dsymonds@golang.org>

AuthorDate: Mon Dec813:50:492014 +1100

Commit:     David Symonds <dsymonds@golang.org>

CommitDate: Mon Dec813:50:492014 +1100


   remove .hgtags.


.hgtags | 140 ----------------------------------------------------------------

1 file changed, 140 deletions(-)


commit 369873c6e5d00314ae30276363f58e5af11b149c

Author:     David Symonds <dsymonds@golang.org>

AuthorDate: Mon Dec813:50:492014 +1100

Commit:     David Symonds <dsymonds@golang.org>

CommitDate: Mon Dec813:50:492014 +1100


   convert .hgignore to .gitignore.


.hgignore => .gitignore | 9 +--------

1 file changed, 1 insertion(+), 8 deletions(-)


commit f33fc0eb95be84f0a688a62e25361a117e5b995b

Author:     David Symonds <dsymonds@golang.org>

AuthorDate: Mon Dec813:53:112014 +1100

Commit:     David Symonds <dsymonds@golang.org>

CommitDate: Mon Dec813:53:112014 +1100


   cmd/dist: convert dist from Hg to Git.


src/cmd/dist/build.c | 100 ++++++++++++++++++++++++++++++---------------------

1 file changed, 59 insertions(+), 41 deletions(-)


commit 26399948e3402d3512cb14fe5901afaef54482fa

Author:     David Symonds <dsymonds@golang.org>

AuthorDate: Mon Dec811:39:112014 +1100

Commit:     David Symonds <dsymonds@golang.org>

CommitDate: Mon Dec804:42:222014 +0000


  add bin/ to .gitignore.


   Change-Id: I5c788d324e56ca88366fb54b67240cebf5dced2c

   Reviewed-on: https://go-review.googlesource.com/1171

   Reviewed-by: Andrew Gerrand <adg@golang.org>


.gitignore | 1 +

1 file changed, 1 insertion(+)

许多人认为 Go 托管在 GitHub 上,但 GitHub 只是问题跟踪器的主要来源:源代码的官方主要副本位于 go.googlesource.com。

至此,这就是Go转向第五个版本控制系统前的故事。

原文链接:https://research.swtch.com/govcs

相关文章
|
1月前
|
自然语言处理 搜索推荐 Go
goctl 技术系列 - Go 模板入门
goctl 技术系列 - Go 模板入门
|
1月前
|
缓存 弹性计算 API
用 Go 快速开发一个 RESTful API 服务
用 Go 快速开发一个 RESTful API 服务
|
1月前
|
JSON 中间件 Go
go语言后端开发学习(四) —— 在go项目中使用Zap日志库
本文详细介绍了如何在Go项目中集成并配置Zap日志库。首先通过`go get -u go.uber.org/zap`命令安装Zap,接着展示了`Logger`与`Sugared Logger`两种日志记录器的基本用法。随后深入探讨了Zap的高级配置,包括如何将日志输出至文件、调整时间格式、记录调用者信息以及日志分割等。最后,文章演示了如何在gin框架中集成Zap,通过自定义中间件实现了日志记录和异常恢复功能。通过这些步骤,读者可以掌握Zap在实际项目中的应用与定制方法
go语言后端开发学习(四) —— 在go项目中使用Zap日志库
|
19天前
|
消息中间件 NoSQL Go
PHP转Go系列 | ThinkPHP与Gin框架之Redis延时消息队列技术实践
【9月更文挑战第7天】在从 PHP 的 ThinkPHP 框架迁移到 Go 的 Gin 框架时,涉及 Redis 延时消息队列的技术实践主要包括:理解延时消息队列概念,其能在特定时间处理消息,适用于定时任务等场景;在 ThinkPHP 中使用 Redis 实现延时队列;在 Gin 中结合 Go 的 Redis 客户端库实现类似功能;Go 具有更高性能和简洁性,适合处理大量消息。迁移过程中需考虑业务需求及系统稳定性。
|
1月前
|
算法 NoSQL 中间件
go语言后端开发学习(六) ——基于雪花算法生成用户ID
本文介绍了分布式ID生成中的Snowflake(雪花)算法。为解决用户ID安全性与唯一性问题,Snowflake算法生成的ID具备全局唯一性、递增性、高可用性和高性能性等特点。64位ID由符号位(固定为0)、41位时间戳、10位标识位(含数据中心与机器ID)及12位序列号组成。面对ID重复风险,可通过预分配、动态或统一分配标识位解决。Go语言实现示例展示了如何使用第三方包`sonyflake`生成ID,确保不同节点产生的ID始终唯一。
go语言后端开发学习(六) ——基于雪花算法生成用户ID
|
1月前
|
JSON 缓存 监控
go语言后端开发学习(五)——如何在项目中使用Viper来配置环境
Viper 是一个强大的 Go 语言配置管理库,适用于各类应用,包括 Twelve-Factor Apps。相比仅支持 `.ini` 格式的 `go-ini`,Viper 支持更多配置格式如 JSON、TOML、YAML
go语言后端开发学习(五)——如何在项目中使用Viper来配置环境
|
1月前
|
JSON 编解码 中间件
go-zero代码生成器助你高效开发
go-zero代码生成器助你高效开发
|
1月前
|
Java Go API
我用go-zero开发了第一个线上项目
我用go-zero开发了第一个线上项目
|
1月前
|
监控 Serverless Go
Golang 开发函数计算问题之Go 语言中切片扩容时需要拷贝原数组中的数据如何解决
Golang 开发函数计算问题之Go 语言中切片扩容时需要拷贝原数组中的数据如何解决
|
1月前
|
Go 开发者
Go1.22 新特性:Slices 变更 Concat、Delete、Insert 等函数,对开发挺有帮助!
Go1.22 新特性:Slices 变更 Concat、Delete、Insert 等函数,对开发挺有帮助!