Go development team technical leader Russ Cox (rsc) post describes the history of version control for Go. The reason is that every once in a while, someone always uses the following code to indicate that the first commit of Go was in 1972.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
% 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 thinks this is silly, so he reveals more interesting history about Go version control, such as the fact that the real first commit of Go is actually the 5th commit, and the ones before that are fake commits.
1
2
3
4
5
6
7
8
9
10
11
12
|
commit 18c5b488a3b2e218c0e0cf2a7d4820d9da93a554
Author: Robert Griesemer <gri@golang.org>
AuthorDate: Sun Mar 2 20:47:34 2008 -0800
Commit: Robert Griesemer <gri@golang.org>
CommitDate: Sun Mar 2 20:47:34 2008 -0800
Go spec starting point.
SVN=111041
doc/go_spec | 1197 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 1197 insertions(+)
|
There are four version control systems that Go has used: SVN, Perforce, Mercurial, and Git.
SVN
When Go was first launched, it used SVN as its version control system, allegedly because Google wanted to evaluate the feasibility of rolling out SVN internally on a large scale. The end result was not SVN, but the first real commit of Go mentioned above was committed to the SVN server, so it’s safe to say that SVN has seen the birth of Go.
Perforce
Go made its last commit to SVN in July 2008 and has been using Perforce ever since.
Here is the first commit of Go’s migration to Perforce.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
commit 777ee7163bba96f2c9b3dfe135d8ad4ab837c062
Author: Rob Pike <r@golang.org>
AuthorDate: Mon Jul 21 16:18:04 2008 -0700
Commit: Rob Pike <r@golang.org>
CommitDate: Mon Jul 21 16:18:04 2008 -0700
map delete
SVN=128258
doc/go_lang.txt | 6 ++++++
1 file changed, 6 insertions(+)
commit 05caa7f82030327ccc9ae63a2b0121a029286501
Author: Rob Pike <r@golang.org>
AuthorDate: Mon Jul 21 17:10:49 2008 -0700
Commit: Rob Pike <r@golang.org>
CommitDate: Mon Jul 21 17:10:49 2008 -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(+)
|
After migrating to Perforce, you can see that the tags DELTA=
, OCL=
and CL=
have been introduced. And many other changes have the same OCL=
and CL=
, as follows.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
commit c1f5eda7a2465dae196d1fa10baf6bfa9253808a
Author: Rob Pike <r@golang.org>
AuthorDate: Mon Jul 21 18:06:39 2008 -0700
Commit: Rob Pike <r@golang.org>
CommitDate: Mon Jul 21 18:06:39 2008 -0700
change date
OCL=13331
CL=13331
doc/go_lang.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
|
Most of Go’s development work prior to open source was done on Perforce servers.
Mercurial
In October 2009, Go’s version control system began switching to Mercurial.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
commit 942d6590d9005f89e971ed5af0374439a264a20e
Author: Kai Backman <kaib@golang.org>
AuthorDate: Fri Oct 23 11:03:16 2009 -0700
Commit: Kai Backman <kaib@golang.org>
CommitDate: Fri Oct 23 11:03:16 2009 -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 23 12:43:01 2009 -0700
Commit: Kai Backman <kaib@golang.org>
CommitDate: Fri Oct 23 12:43:01 2009 -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(-)
|
The switch was also part of the preparations for open-sourcing Go in November, and the development team also needed to add the new open-source copyright notice to each file. rsc said this work took him about a week.
Git
From November 2009 to the end of 2014, Go also had to find a new code hosting solution due to the impending closure of Google Code Project Hosting. After researching several options, they ended up using Gerrit Code Review. Many people believe that Go is hosted on GitHub, but GitHub is only the primary source for issue trackers: the official primary copy of the source code is located at go.googlesource.com.
The following commit is a testament to Go’s transition from Mercurial to Git.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
commit 94151eb2799809ece7e44ce3212aa3cbb9520849
Author: Russ Cox <rsc@golang.org>
AuthorDate: Fri Dec 5 21:33:07 2014 -0500
Commit: Russ Cox <rsc@golang.org>
CommitDate: Fri Dec 5 21:33:07 2014 -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 Dec 8 13:50:49 2014 +1100
Commit: David Symonds <dsymonds@golang.org>
CommitDate: Mon Dec 8 13:50:49 2014 +1100
remove .hgtags.
.hgtags | 140 ----------------------------------------------------------------
1 file changed, 140 deletions(-)
commit 369873c6e5d00314ae30276363f58e5af11b149c
Author: David Symonds <dsymonds@golang.org>
AuthorDate: Mon Dec 8 13:50:49 2014 +1100
Commit: David Symonds <dsymonds@golang.org>
CommitDate: Mon Dec 8 13:50:49 2014 +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 Dec 8 13:53:11 2014 +1100
Commit: David Symonds <dsymonds@golang.org>
CommitDate: Mon Dec 8 13:53:11 2014 +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 Dec 8 11:39:11 2014 +1100
Commit: David Symonds <dsymonds@golang.org>
CommitDate: Mon Dec 8 04:42:22 2014 +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(+)
|
Click here for more presentations.