...

Text file src/cmd/go/testdata/vcstest/git/vgotest1.txt

Documentation: cmd/go/testdata/vcstest/git

     1handle git
     2
     3env GIT_AUTHOR_NAME='Russ Cox'
     4env GIT_AUTHOR_EMAIL='rsc@golang.org'
     5env GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME
     6env GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL
     7
     8git init
     9
    10at 2018-02-19T17:21:09-05:00
    11git add LICENSE README.md
    12git commit -m 'initial commit'
    13git branch -m master
    14
    15git checkout --detach HEAD
    16
    17at 2018-02-19T18:10:06-05:00
    18mkdir pkg
    19echo 'package p // pkg/p.go'
    20cp stdout pkg/p.go
    21git add pkg/p.go
    22git commit -m 'add pkg/p.go'
    23git tag v0.0.0
    24git tag v1.0.0
    25git tag mytag
    26
    27git checkout --detach HEAD
    28
    29at 2018-02-19T18:14:23-05:00
    30mkdir v2
    31echo 'module "github.com/rsc/vgotest1/v2" // root go.mod'
    32cp stdout go.mod
    33git add go.mod
    34git commit -m 'go.mod v2'
    35git tag v2.0.1
    36
    37at 2018-02-19T18:15:11-05:00
    38mkdir submod/pkg
    39echo 'package p // submod/pkg/p.go'
    40cp stdout submod/pkg/p.go
    41git add submod/pkg/p.go
    42git commit -m 'submod/pkg/p.go'
    43git tag v2.0.2
    44
    45at 2018-02-19T18:16:04-05:00
    46echo 'module "github.com/rsc/vgotest" // v2/go.mod'
    47cp stdout v2/go.mod
    48git add v2/go.mod
    49git commit -m 'v2/go.mod: bad go.mod (no version)'
    50git tag v2.0.3
    51
    52at 2018-02-19T19:03:38-05:00
    53env GIT_AUTHOR_DATE=2018-02-19T18:16:38-05:00
    54echo 'module "github.com/rsc/vgotest1/v2" // v2/go.mod'
    55cp stdout v2/go.mod
    56git add v2/go.mod
    57git commit -m 'v2/go.mod: fix'
    58git tag v2.0.4
    59
    60at 2018-02-19T19:03:59-05:00
    61env GIT_AUTHOR_DATE=2018-02-19T18:17:02-05:00
    62echo 'module "github.com/rsc/vgotest1" // root go.mod'
    63cp stdout go.mod
    64git add go.mod
    65git commit -m 'go.mod: drop v2'
    66git tag v2.0.5
    67
    68git checkout --detach mytag
    69
    70at 2018-02-19T18:10:28-05:00
    71echo 'module "github.com/rsc/vgotest1" // root go.mod'
    72cp stdout go.mod
    73git add go.mod
    74git commit -m 'go.mod'
    75git tag v0.0.1
    76git tag v1.0.1
    77
    78at 2018-02-19T18:11:28-05:00
    79mkdir submod/pkg
    80echo 'package pkg // submod/pkg/p.go'
    81cp stdout submod/pkg/p.go
    82git add submod
    83git commit -m 'submod/pkg/p.go'
    84git tag v1.0.2
    85
    86at 2018-02-19T18:12:07-05:00
    87echo 'module "github.com/vgotest1/submod" // submod/go.mod'
    88cp stdout submod/go.mod
    89git add submod/go.mod
    90git commit -m 'submod/go.mod'
    91git tag v1.0.3
    92git tag submod/v1.0.4
    93
    94at 2018-02-19T18:12:59-05:00
    95git apply 0001-submod-go.mod-add-require-vgotest1-v1.1.0.patch
    96git commit -a -m 'submod/go.mod: add require vgotest1 v1.1.0'
    97git tag submod/v1.0.5
    98
    99at 2018-02-19T18:13:36-05:00
   100git apply 0002-go.mod-add-require-submod-v1.0.5.patch
   101git commit -a -m 'go.mod: add require submod v1.0.5'
   102git tag v1.1.0
   103
   104git checkout master
   105
   106at 2018-02-19T17:23:01-05:00
   107mkdir pkg
   108echo 'package pkg'
   109cp stdout pkg/p.go
   110git add pkg/p.go
   111git commit -m 'pkg: add'
   112
   113at 2018-02-19T17:30:23-05:00
   114env GIT_AUTHOR_DATE=2018-02-19T17:24:48-05:00
   115echo 'module "github.com/vgotest1/v2"'
   116cp stdout go.mod
   117git add go.mod
   118git commit -m 'add go.mod'
   119
   120at 2018-02-19T17:30:45-05:00
   121echo 'module "github.com/vgotest1"'
   122cp stdout go.mod
   123git add go.mod
   124git commit -m 'bad mod path'
   125
   126at 2018-02-19T17:31:34-05:00
   127mkdir v2
   128echo 'module "github.com/vgotest1/v2"'
   129cp stdout v2/go.mod
   130git add v2/go.mod
   131git commit -m 'add v2/go.mod'
   132
   133at 2018-02-19T17:32:37-05:00
   134echo 'module "github.com/vgotest1/v2"'
   135cp stdout go.mod
   136git add go.mod
   137git commit -m 'say v2 in root go.mod'
   138
   139git checkout --detach HEAD
   140at 2018-02-19T17:51:24-05:00
   141	# README.md at this commit lacked a trailing newline, so 'git apply' can't
   142	# seem to apply it correctly as a patch. Instead, we use 'echo -e' to write
   143	# the exact contents.
   144unquote 'This is a test repo for versioned go.\nThere''s nothing useful here.\n\n	v0.0.0 - has pkg/p.go\n	v0.0.1 - has go.mod\n	\n	v1.0.0 - has pkg/p.go\n	v1.0.1 - has go.mod\n	v1.0.2 - has submod/pkg/p.go\n	v1.0.3 - has submod/go.mod\n	submod/v1.0.4 - same\n	submod/v1.0.5 - add requirement on v1.1.0\n	v1.1.0 - add requirement on submod/v1.0.5\n	\n	v2.0.0 - has pkg/p.go\n	v2.0.1 - has go.mod with v2 module path\n	v2.0.2 - has go.mod with v1 (no version) module path\n	v2.0.3 - has v2/go.mod with v2 module path\n	v2.0.5 - has go.mod AND v2/go.mod with v2 module path\n	'
   145cp stdout README.md
   146mkdir v2/pkg
   147echo 'package q'
   148cp stdout v2/pkg/q.go
   149git add README.md v2/pkg/q.go
   150git commit -m 'add q'
   151git tag v2.0.6
   152
   153git checkout --detach mytag~1
   154at 2018-07-18T21:21:27-04:00
   155env GIT_AUTHOR_DATE=2018-02-19T18:10:06-05:00
   156mkdir pkg
   157echo 'package p // pkg/p.go'
   158cp stdout pkg/p.go
   159git add pkg/p.go
   160unquote 'add pkg/p.go\n\nv2\n'
   161cp stdout COMMIT_MSG
   162git commit -F COMMIT_MSG
   163git tag v2.0.0
   164
   165git checkout master
   166
   167git show-ref --tags --heads
   168cmp stdout .git-refs
   169
   170-- .git-refs --
   171a08abb797a6764035a9314ed5f1d757e0224f3bf refs/heads/master
   17280d85c5d4d17598a0e9055e7c175a32b415d6128 refs/tags/mytag
   1738afe2b2efed96e0880ecd2a69b98a53b8c2738b6 refs/tags/submod/v1.0.4
   17470fd92eaa4dacf82548d0c6099f5b853ae2c1fc8 refs/tags/submod/v1.0.5
   17580d85c5d4d17598a0e9055e7c175a32b415d6128 refs/tags/v0.0.0
   1765a115c66393dd8c4a5cc3215653850d7f5640d0e refs/tags/v0.0.1
   17780d85c5d4d17598a0e9055e7c175a32b415d6128 refs/tags/v1.0.0
   1785a115c66393dd8c4a5cc3215653850d7f5640d0e refs/tags/v1.0.1
   1792e38a1a347ba4d9e9946ec0ce480710ff445c919 refs/tags/v1.0.2
   1808afe2b2efed96e0880ecd2a69b98a53b8c2738b6 refs/tags/v1.0.3
   181b769f2de407a4db81af9c5de0a06016d60d2ea09 refs/tags/v1.1.0
   18245f53230a74ad275c7127e117ac46914c8126160 refs/tags/v2.0.0
   183ea65f87c8f52c15ea68f3bdd9925ef17e20d91e9 refs/tags/v2.0.1
   184f7b23352af1cd750b11e4673b20b24c2d239430a refs/tags/v2.0.2
   185f18795870fb14388a21ef3ebc1d75911c8694f31 refs/tags/v2.0.3
   1861f863feb76bc7029b78b21c5375644838962f88d refs/tags/v2.0.4
   1872f615117ce481c8efef46e0cc0b4b4dccfac8fea refs/tags/v2.0.5
   188a01a0aef06cbd571294fc5451788cd4eadbfd651 refs/tags/v2.0.6
   189-- LICENSE --
   190Copyright (c) 2009 The Go Authors. All rights reserved.
   191
   192Redistribution and use in source and binary forms, with or without
   193modification, are permitted provided that the following conditions are
   194met:
   195
   196   * Redistributions of source code must retain the above copyright
   197notice, this list of conditions and the following disclaimer.
   198   * Redistributions in binary form must reproduce the above
   199copyright notice, this list of conditions and the following disclaimer
   200in the documentation and/or other materials provided with the
   201distribution.
   202   * Neither the name of Google Inc. nor the names of its
   203contributors may be used to endorse or promote products derived from
   204this software without specific prior written permission.
   205
   206THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   207"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   208LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   209A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   210OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   211SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   212LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   213DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   214THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   215(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   216OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   217-- README.md --
   218This is a test repo for versioned go.
   219There's nothing useful here.
   220-- 0001-submod-go.mod-add-require-vgotest1-v1.1.0.patch --
   221From 70fd92eaa4dacf82548d0c6099f5b853ae2c1fc8 Mon Sep 17 00:00:00 2001
   222From: Russ Cox <rsc@golang.org>
   223Date: Mon, 19 Feb 2018 18:12:59 -0500
   224Subject: [PATCH] submod/go.mod: add require vgotest1 v1.1.0
   225
   226---
   227 submod/go.mod | 1 +
   228 1 file changed, 1 insertion(+)
   229
   230diff --git a/submod/go.mod b/submod/go.mod
   231index 7b18d93..c88de0f 100644
   232--- a/submod/go.mod
   233+++ b/submod/go.mod
   234@@ -1 +1,2 @@
   235 module "github.com/vgotest1/submod" // submod/go.mod
   236+require "github.com/vgotest1" v1.1.0
   237--
   2382.36.1.838.g23b219f8e3
   239-- 0002-go.mod-add-require-submod-v1.0.5.patch --
   240From b769f2de407a4db81af9c5de0a06016d60d2ea09 Mon Sep 17 00:00:00 2001
   241From: Russ Cox <rsc@golang.org>
   242Date: Mon, 19 Feb 2018 18:13:36 -0500
   243Subject: [PATCH] go.mod: add require submod v1.0.5
   244
   245---
   246 go.mod | 1 +
   247 1 file changed, 1 insertion(+)
   248
   249diff --git a/go.mod b/go.mod
   250index ac7a6d7..6118671 100644
   251--- a/go.mod
   252+++ b/go.mod
   253@@ -1 +1,2 @@
   254 module "github.com/rsc/vgotest1" // root go.mod
   255+require "github.com/rsc/vgotest1/submod" v1.0.5
   256--
   2572.36.1.838.g23b219f8e3

View as plain text