Since commit 87e19535, the ETag check when writing out a file through a symlink (following the symlink) has been incorrectly using the ETag value of the symlink, rather than the target file. This is incorrect because the ETag should represent the file content, not its metadata or links to it.
Fix that, and add a unit test.
Signed-off-by: Philip Withnall firstname.lastname@example.org
Fixes: #2417 (closed)
Trivial backport of !2138 (merged) (excluding the second commit which was an incidental cleanup) to