Skip to content

Commit a36dd12

Browse files
authored
chore: bazel run //:buildifier (#903)
1 parent 385717a commit a36dd12

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

e2e/smoke/BUILD.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ copy_directory(
116116

117117
sh_test(
118118
name = "test_preserve_mtime",
119+
size = "small",
119120
srcs = ["test_preserve_mtime.sh"],
120121
data = [
121122
"d",
122-
":copy_to_directory_mtime_case",
123123
":copy_directory_mtime_case",
124+
":copy_to_directory_mtime_case",
124125
],
125-
size = "small",
126126
)

e2e/smoke/test_preserve_mtime.sh

+15-15
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
set -euo pipefail
44

55
function main {
6-
compareMTimes d/1 copy_to_directory_mtime_out/d/1
7-
compareMTimes d/1 copy_directory_mtime_out/1
6+
compareMTimes d/1 copy_to_directory_mtime_out/d/1
7+
compareMTimes d/1 copy_directory_mtime_out/1
88
}
99

1010
function compareMTimes {
11-
local originalFile="$1"
12-
local copiedFile="$2"
11+
local originalFile="$1"
12+
local copiedFile="$2"
1313

14-
local mtimeOriginal
15-
mtimeOriginal="$(stat --dereference --format=%y "$originalFile")"
14+
local mtimeOriginal
15+
mtimeOriginal="$(stat --dereference --format=%y "$originalFile")"
1616

17-
local mtimeCopy
18-
mtimeCopy="$(stat --dereference --format=%y "$copiedFile")"
17+
local mtimeCopy
18+
mtimeCopy="$(stat --dereference --format=%y "$copiedFile")"
1919

20-
if [[ "$mtimeOriginal" != "$mtimeCopy" ]]; then
21-
echo "Preserve mtime test failed. Modify times do not match for $originalFile and $copiedFile"
22-
echo " Original modify time: $mtimeOriginal"
23-
echo " Copied modify time: $mtimeCopy"
24-
return 1
25-
fi
20+
if [[ "$mtimeOriginal" != "$mtimeCopy" ]]; then
21+
echo "Preserve mtime test failed. Modify times do not match for $originalFile and $copiedFile"
22+
echo " Original modify time: $mtimeOriginal"
23+
echo " Copied modify time: $mtimeCopy"
24+
return 1
25+
fi
2626

27-
echo "Preserve mtime test passed for $originalFile and $copiedFile"
27+
echo "Preserve mtime test passed for $originalFile and $copiedFile"
2828
}
2929

3030
main "$@"

tools/common/copy.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ func (w *CopyWorker) Run(wg *sync.WaitGroup) {
106106
}
107107

108108
type CopyOpts struct {
109-
src, dst string
110-
srcInfo fs.FileInfo
111-
hardlink bool
112-
verbose bool
109+
src, dst string
110+
srcInfo fs.FileInfo
111+
hardlink bool
112+
verbose bool
113113
preserveMTime bool
114114
}
115115

0 commit comments

Comments
 (0)