Sean Liao submitted the change![Open in Gerrit]()
Change information
Commit message:
cmd/go: check if build output should overwrite files with renames
CopyFile has a check to ensure that only object files are overwritten.
Extend this to moveOrCopyFile, so the check also happens when the source
and destination file are on the same filesystem (when renames are a
valid way of moving files).
Fixes #75970
Change-Id: Ie667301f1c9c00b114cfd91cdf8053ac20fd817b
Files:
- M src/cmd/go/internal/work/shell.go
- A src/cmd/go/testdata/script/build_output_overwrite.txt
Change size: M
Delta: 2 files changed, 43 insertions(+), 10 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +1 by Ian Alexander, +1 by Laurent Demailly, +2 by Michael Matloob, +1 by Michael Matloob
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ie667301f1c9c00b114cfd91cdf8053ac20fd817b
Gerrit-Change-Number: 712960
Gerrit-PatchSet: 5