It's been a long standing issue, that if you write a file with extended attributes and backupcopy=no, the file will loose the extended attributes.
So this patch adds support for retrieving the extended attributes and copying it to the new file. It currently only works on linux, mainly I don't know the different APIs for other systems (BSD, MacOSX and Solaris). On linux, this should be supported since Kernel 2.4 or something, so this should be pretty safe to use now.
I think it makes sense to have this enabled in normal builds so it is not so surprising if one loses those attributes, but not sure.
I also added it explicitly to the :version output as well as make it able to check using :echo has("xattr"), to have users easily check that this is available.
In contrast to the similar support for SELINUX and SMACK support (which also internally uses extended attributes), I have made this a FEAT_XATTR define, instead of the similar HAVE_XATTR, but that should just be a implementation detail (but happy to change if wanted).
todo:
[ ] try to write tests.
closes: #306
https://github.com/vim/vim/pull/13203
(14 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Merging #13203 (14d80b2) into master (b90e3bc) will increase coverage by
0.00%.
Report is 1 commits behind head on master.
The diff coverage isn/a.
@@ Coverage Diff @@ ## master #13203 +/- ## ======================================= Coverage 82.13% 82.14% ======================================= Files 160 160 Lines 195393 195393 Branches 43844 43844 ======================================= + Hits 160485 160500 +15 + Misses 22063 22049 -14 + Partials 12845 12844 -1
| Flag | Coverage Δ | |
|---|---|---|
| huge-clang-Array | 82.78% <ø> (+<0.01%) |
⬆️ |
| linux | 82.78% <ø> (+<0.01%) |
⬆️ |
| mingw-x64-HUGE | 76.72% <ø> (+<0.01%) |
⬆️ |
| mingw-x86-HUGE | 77.23% <ø> (+0.01%) |
⬆️ |
| windows | 78.31% <ø> (+0.01%) |
⬆️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| src/bufwrite.c | 73.74% <ø> (ø) |
|
| src/evalfunc.c | 90.25% <ø> (ø) |
|
| src/os_unix.c | 67.15% <ø> (ø) |
|
| src/version.c | 85.24% <ø> (ø) |
... and 14 files with indirect coverage changes
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()