sourcegraph/internal/fileutil
Erik Seliger 255dad8768
gitserver: Implement RefHash in backend (#62612)
This PR moves the implementation of ComputeRefHash to the GitBackend interface and reduces the amount of memory needed by it. We get proper tracking of the command by that, including error logs, resource usage, invocation count etc.

Since there is no 1000% guarantee that this didn't change the hash, I opted for resetting the last changed value and recomputing from scratch, by changing the path of the file to _v2.

Test plan:

Tests are still passing.
2024-05-13 16:05:16 +02:00
..
BUILD.bazel Add additional logging for rename failures (#58458) 2023-11-21 14:55:00 +01:00
fileinfo.go gitserver: Implement Stat and ReadDir in gRPC API (#62107) 2024-05-11 00:58:28 +02:00
fileutil_posix.go Add additional logging for rename failures (#58458) 2023-11-21 14:55:00 +01:00
fileutil_test.go gitserver: Implement RefHash in backend (#62612) 2024-05-13 16:05:16 +02:00
fileutil_windows.go Enable servers to run on Windows OS. (#54233) 2023-06-27 09:04:30 +00:00
fileutil.go Enable servers to run on Windows OS. (#54233) 2023-06-27 09:04:30 +00:00