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

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

View as plain text