glocalfile: Only copy meaningful fields from struct statx to GFileInfo

At least in theory, the Linux kernel can now tell us which fields in
struct statx have meaningful values (although in practice it doesn't
seem to unset any of the STATX_BASIC_STATS bits except STATX_ATIME,
even on FAT filesystems where the uid and gid are not meaningful).

Signed-off-by: Simon McVittie <smcv@collabora.com>
14 jobs for wip/smcv/statx-no-required-mask in 14 minutes and 25 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Style Check
failed #901932
allowed to fail
check-todos

00:01:08

failed #901931
allowed to fail
style-check-diff

00:01:18

 
  Build
passed #901935
cross-android_api21_arm64

00:00:55

passed #901936
cross-android_api28_arm64

00:00:54

passed #901937
cross-mingw64

00:02:54

passed #902424
debian-stable-x86_64

00:01:48

passed #901933
fedora-x86_64

00:09:50

passed #901940
freebsd-11
freebsd-11-x86_64

00:06:06

passed #901941
freebsd-12
freebsd-12-x86_64

00:04:49

passed #901942
macos
macos

00:04:22

passed #901938
win32-ps
msys2-mingw32

00:06:12

passed #901939
win32-ps
vs2017-x64

00:07:56

failed #901934
debian-stable-x86_64

00:03:29

 
  Coverage
passed #901943
coverage

00:00:55

78.4%
 
Name Stage Failure
failed
style-check-diff Style Check
-	  if (fchmod (bfd,
+ fchown (bfd, (uid_t) -1, _g_stat_gid (&original_stat)) != 0)
+ {
+ /* TODO: Check for G_LOCAL_FILE_STAT_FIELD_MODE? */
+ if (fchmod (bfd,
(_g_stat_mode (&original_stat) & 0707) |
((_g_stat_mode (&original_stat) & 07) << 3)) != 0)
{
ERROR: Job failed: exit code 1
failed
check-todos Style Check
 * [new tag]             glib-2-2-branchpoint    -> glib-2-2-branchpoint
* [new tag] glib-2-4-branchpoint -> glib-2-4-branchpoint
* [new tag] glib-2-6-branchpoint -> glib-2-6-branchpoint
* [new tag] glib-2.25.7 -> glib-2.25.7
* [new tag] gobject_0_10_0 -> gobject_0_10_0
* [new tag] gobject_0_9_0 -> gobject_0_9_0
* [new tag] start -> start
Saw banned keywords in a commit diff: TODO. This indicates the branch is a work in progress and should not be merged in its current form.
ERROR: Job failed: exit code 1