Text file src/cmd/go/testdata/script/mod_download_git_decorate_full.txt

     1  env GO111MODULE=on
     2  
     3  [short] skip
     4  [!git] skip
     5  
     6  # Redirect git to a test-specific .gitconfig.
     7  # GIT_CONFIG_GLOBAL suffices for git 2.32.0 and newer.
     8  # For older git versions we also set $HOME.
     9  env GIT_CONFIG_GLOBAL=$WORK${/}home${/}gopher${/}.gitconfig
    10  env HOME=$WORK${/}home${/}gopher
    11  exec git config --global --show-origin user.name
    12  stdout 'Go Gopher'
    13  
    14  env GOPROXY=direct
    15  
    16  exec git config --get log.decorate
    17  stdout 'full'
    18  
    19  # Test that Git log with user's global config '~/gitconfig' has log.decorate=full
    20  # go mod download has an error 'v1.x.y is not a tag'
    21  # with go1.16.14:
    22  # `go1.16.14 list -m vcs-test.golang.org/git/gitrepo1.git@v1.2.3`
    23  # will output with error:
    24  # go list -m: vcs-test.golang.org/git/gitrepo1.git@v1.2.3: invalid version: unknown revision v1.2.3
    25  # See golang/go#51312.
    26  go list -m vcs-test.golang.org/git/gitrepo1.git@v1.2.3
    27  stdout 'vcs-test.golang.org/git/gitrepo1.git v1.2.3'
    28  
    29  -- $WORK/home/gopher/.gitconfig --
    30  [user]
    31  	name = Go Gopher
    32  	email = gopher@golang.org
    33  [log]
    34  	decorate = full
    35  

View as plain text