...

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

Documentation: cmd/go/testdata/script

     1env 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.
     9env GIT_CONFIG_GLOBAL=$WORK${/}home${/}gopher${/}.gitconfig
    10env HOME=$WORK${/}home${/}gopher
    11exec git config --global --show-origin user.name
    12stdout 'Go Gopher'
    13
    14env GOPROXY=direct
    15
    16exec git config --get log.decorate
    17stdout '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.
    26go list -m vcs-test.golang.org/git/gitrepo1.git@v1.2.3
    27stdout '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

View as plain text