]> Cypherpunks.ru repositories - gostls13.git/commit
[release-branch.go1.21] cmd/go: fix missing case checking for empty slice
authorMichael Matloob <matloob@golang.org>
Mon, 7 Aug 2023 21:03:43 +0000 (17:03 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 15 Aug 2023 19:04:26 +0000 (19:04 +0000)
commit3475e6af4cd6ab7d28ea5a7613eff65be140fbb9
tree3197c8a08d11bdcd46f384ebd9dd323607c3ebc5
parent179821c9e12d18c8134429fabe50d3dfaecb948e
[release-branch.go1.21] cmd/go: fix missing case checking for empty slice

When we were comparing the first element of import stacks when sorting
depserrors we checked if the first stack was non empty, but not the
second one. Do the check for both stacks.

Fixes #61818
Updates #61816
For #59905

Change-Id: Id5c11c2b1104eec93196a08c53372ee2ba97c701
Reviewed-on: https://go-review.googlesource.com/c/go/+/516739
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
(cherry picked from commit 58447d757c233f2a9c3c5a73e2d96a6885f2759a)
Reviewed-on: https://go-review.googlesource.com/c/go/+/519658
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/go/internal/list/list.go
src/cmd/go/testdata/script/list_issue_59905.txt