isomorphic-git 1.44.6 → 1.44.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/index.cjs +63 -12
- package/index.js +63 -12
- package/index.umd.min.js +1 -1
- package/index.umd.min.js.map +1 -1
- package/managers/index.cjs +49 -7
- package/managers/index.js +49 -7
- package/managers/index.umd.min.js +1 -1
- package/managers/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -465,6 +465,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
|
|
|
465
465
|
<td align="center"><a href="https://github.com/snowyukitty"><img src="https://avatars.githubusercontent.com/u/270071858?v=4?s=60" width="60px;" alt=""/><br /><sub><b>snowyukitty</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=snowyukitty" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=snowyukitty" title="Tests">⚠️</a></td>
|
|
466
466
|
<td align="center"><a href="https://github.com/ShahabAhmed01"><img src="https://avatars.githubusercontent.com/u/192491541?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Shahab Ahmed</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ShahabAhmed01" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ShahabAhmed01" title="Tests">⚠️</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ShahabAhmed01" title="Documentation">📖</a></td>
|
|
467
467
|
<td align="center"><a href="https://github.com/wleeaf"><img src="https://avatars.githubusercontent.com/u/179125857?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Wleeaf</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=wleeaf" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=wleeaf" title="Tests">⚠️</a></td>
|
|
468
|
+
<td align="center"><a href="https://github.com/SergioSRcode"><img src="https://avatars.githubusercontent.com/u/104135678?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Sergio</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=SergioSRcode" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=SergioSRcode" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=SergioSRcode" title="Tests">⚠️</a></td>
|
|
468
469
|
</tr>
|
|
469
470
|
</table>
|
|
470
471
|
|
package/index.cjs
CHANGED
|
@@ -707,13 +707,25 @@ function parseCacheEntryFlags(bits) {
|
|
|
707
707
|
extended: Boolean(bits & 0b0100000000000000),
|
|
708
708
|
stage: (bits & 0b0011000000000000) >> 12,
|
|
709
709
|
nameLength: bits & 0b0000111111111111,
|
|
710
|
+
skipWorktree: false,
|
|
711
|
+
intentToAdd: false,
|
|
710
712
|
}
|
|
711
713
|
}
|
|
712
714
|
|
|
715
|
+
// Bits of the version 3 extended flags field that git understands:
|
|
716
|
+
// 1-bit reserved, 1-bit skip-worktree, 1-bit intent-to-add, 13 unused bits
|
|
717
|
+
const SKIP_WORKTREE = 0b0100000000000000;
|
|
718
|
+
const INTENT_TO_ADD = 0b0010000000000000;
|
|
719
|
+
|
|
720
|
+
function hasExtendedFlags(entry) {
|
|
721
|
+
return Boolean(entry.flags.skipWorktree || entry.flags.intentToAdd)
|
|
722
|
+
}
|
|
723
|
+
|
|
713
724
|
function renderCacheEntryFlags(entry) {
|
|
714
725
|
const flags = entry.flags;
|
|
715
|
-
// 1-bit extended flag
|
|
716
|
-
flags
|
|
726
|
+
// 1-bit extended flag, set only when the entry needs the extended
|
|
727
|
+
// flags field that version 3 adds
|
|
728
|
+
flags.extended = hasExtendedFlags(entry);
|
|
717
729
|
// 12-bit name length if the length is less than 0xFFF; otherwise 0xFFF
|
|
718
730
|
// is stored in this field.
|
|
719
731
|
flags.nameLength = Math.min(Buffer.from(entry.path).length, 0xfff);
|
|
@@ -725,6 +737,13 @@ function renderCacheEntryFlags(entry) {
|
|
|
725
737
|
)
|
|
726
738
|
}
|
|
727
739
|
|
|
740
|
+
function renderCacheEntryExtendedFlags(entry) {
|
|
741
|
+
return (
|
|
742
|
+
(entry.flags.skipWorktree ? SKIP_WORKTREE : 0) +
|
|
743
|
+
(entry.flags.intentToAdd ? INTENT_TO_ADD : 0)
|
|
744
|
+
)
|
|
745
|
+
}
|
|
746
|
+
|
|
728
747
|
class GitIndex {
|
|
729
748
|
/*::
|
|
730
749
|
_entries: Map<string, CacheEntry>
|
|
@@ -784,7 +803,7 @@ class GitIndex {
|
|
|
784
803
|
}
|
|
785
804
|
|
|
786
805
|
const version = reader.readUInt32BE();
|
|
787
|
-
if (version !== 2) {
|
|
806
|
+
if (version !== 2 && version !== 3) {
|
|
788
807
|
throw new InternalError(`Unsupported dircache version: ${version}`)
|
|
789
808
|
}
|
|
790
809
|
const numEntries = reader.readUInt32BE();
|
|
@@ -804,7 +823,16 @@ class GitIndex {
|
|
|
804
823
|
entry.oid = reader.slice(20).toString('hex');
|
|
805
824
|
const flags = reader.readUInt16BE();
|
|
806
825
|
entry.flags = parseCacheEntryFlags(flags);
|
|
807
|
-
|
|
826
|
+
if (entry.flags.extended) {
|
|
827
|
+
const extendedFlags = reader.readUInt16BE();
|
|
828
|
+
if (extendedFlags & ~(SKIP_WORKTREE | INTENT_TO_ADD)) {
|
|
829
|
+
throw new InternalError(
|
|
830
|
+
`Unknown index entry format: 0x${extendedFlags.toString(16)}`
|
|
831
|
+
)
|
|
832
|
+
}
|
|
833
|
+
entry.flags.skipWorktree = Boolean(extendedFlags & SKIP_WORKTREE);
|
|
834
|
+
entry.flags.intentToAdd = Boolean(extendedFlags & INTENT_TO_ADD);
|
|
835
|
+
}
|
|
808
836
|
const pathlength = buffer.indexOf(0, reader.tell() + 1) - reader.tell();
|
|
809
837
|
if (pathlength < 1) {
|
|
810
838
|
throw new InternalError(`Got a path length of: ${pathlength}`)
|
|
@@ -883,6 +911,9 @@ class GitIndex {
|
|
|
883
911
|
}
|
|
884
912
|
stats = normalizeStats(stats);
|
|
885
913
|
const bfilepath = Buffer.from(filepath);
|
|
914
|
+
// Keep the skip-worktree bit of a path outside the sparse checkout.
|
|
915
|
+
// Intent-to-add is cleared, since the path is now staged.
|
|
916
|
+
const existing = stage === 0 ? this._entries.get(filepath) : undefined;
|
|
886
917
|
const entry = {
|
|
887
918
|
ctimeSeconds: stats.ctimeSeconds,
|
|
888
919
|
ctimeNanoseconds: stats.ctimeNanoseconds,
|
|
@@ -904,6 +935,8 @@ class GitIndex {
|
|
|
904
935
|
extended: false,
|
|
905
936
|
stage,
|
|
906
937
|
nameLength: bfilepath.length < 0xfff ? bfilepath.length : 0xfff,
|
|
938
|
+
skipWorktree: Boolean(existing?.flags.skipWorktree),
|
|
939
|
+
intentToAdd: false,
|
|
907
940
|
},
|
|
908
941
|
stages: [],
|
|
909
942
|
};
|
|
@@ -947,8 +980,11 @@ class GitIndex {
|
|
|
947
980
|
|
|
948
981
|
static async _entryToBuffer(entry) {
|
|
949
982
|
const bpath = Buffer.from(entry.path);
|
|
950
|
-
|
|
951
|
-
|
|
983
|
+
const extended = hasExtendedFlags(entry);
|
|
984
|
+
// the fixed length + the extended flags (if any) + the filename + at
|
|
985
|
+
// least one null char => align by 8
|
|
986
|
+
const length =
|
|
987
|
+
Math.ceil((62 + (extended ? 2 : 0) + bpath.length + 1) / 8) * 8;
|
|
952
988
|
const written = Buffer.alloc(length);
|
|
953
989
|
const writer = new BufferCursor(written);
|
|
954
990
|
const stat = normalizeStats(entry);
|
|
@@ -964,6 +1000,9 @@ class GitIndex {
|
|
|
964
1000
|
writer.writeUInt32BE(stat.size);
|
|
965
1001
|
writer.write(entry.oid, 20, 'hex');
|
|
966
1002
|
writer.writeUInt16BE(renderCacheEntryFlags(entry));
|
|
1003
|
+
if (extended) {
|
|
1004
|
+
writer.writeUInt16BE(renderCacheEntryExtendedFlags(entry));
|
|
1005
|
+
}
|
|
967
1006
|
writer.write(entry.path, bpath.length, 'utf8');
|
|
968
1007
|
return written
|
|
969
1008
|
}
|
|
@@ -972,7 +1011,8 @@ class GitIndex {
|
|
|
972
1011
|
const header = Buffer.alloc(12);
|
|
973
1012
|
const writer = new BufferCursor(header);
|
|
974
1013
|
writer.write('DIRC', 4, 'utf8');
|
|
975
|
-
|
|
1014
|
+
// Like canonical git, only use version 3 when an entry needs it
|
|
1015
|
+
writer.writeUInt32BE(this.entriesFlat.some(hasExtendedFlags) ? 3 : 2);
|
|
976
1016
|
writer.writeUInt32BE(this.entriesFlat.length);
|
|
977
1017
|
|
|
978
1018
|
let entryBuffers = [];
|
|
@@ -5118,9 +5158,11 @@ class GitWalkerFs {
|
|
|
5118
5158
|
// 1) if we can (because the oid and mode are the same)
|
|
5119
5159
|
// 2) and only if we need to (because other stats differ)
|
|
5120
5160
|
// 3) and only if the caller opted in to refreshing the index
|
|
5161
|
+
// 4) and not for an intent-to-add entry, which inserting would stage
|
|
5121
5162
|
if (
|
|
5122
5163
|
self.refresh &&
|
|
5123
5164
|
stage &&
|
|
5165
|
+
!stage.flags.intentToAdd &&
|
|
5124
5166
|
oid === stage.oid &&
|
|
5125
5167
|
(!filemode || stats.mode === stage.mode) &&
|
|
5126
5168
|
compareStats(stats, stage, filemode, trustino)
|
|
@@ -6628,7 +6670,10 @@ async function _commit({
|
|
|
6628
6670
|
return GitIndexManager.acquire(
|
|
6629
6671
|
{ fs, gitdir, cache, allowUnmerged: false },
|
|
6630
6672
|
async function (index) {
|
|
6631
|
-
|
|
6673
|
+
// Entries added with `git add --intent-to-add` are not part of the tree
|
|
6674
|
+
const inodes = flatFileListToDirectoryStructure(
|
|
6675
|
+
index.entries.filter(entry => !entry.flags.intentToAdd)
|
|
6676
|
+
);
|
|
6632
6677
|
const inode = inodes.get('.');
|
|
6633
6678
|
if (!tree) {
|
|
6634
6679
|
tree = await constructTree({ fs, gitdir, inode, dryRun });
|
|
@@ -10210,8 +10255,8 @@ function filterCapabilities(server, client) {
|
|
|
10210
10255
|
|
|
10211
10256
|
const pkg = {
|
|
10212
10257
|
name: 'isomorphic-git',
|
|
10213
|
-
version: '1.44.
|
|
10214
|
-
agent: 'git/isomorphic-git@1.44.
|
|
10258
|
+
version: '1.44.7',
|
|
10259
|
+
agent: 'git/isomorphic-git@1.44.7',
|
|
10215
10260
|
};
|
|
10216
10261
|
|
|
10217
10262
|
class FIFO {
|
|
@@ -17155,8 +17200,14 @@ async function status({
|
|
|
17155
17200
|
type: 'blob',
|
|
17156
17201
|
object,
|
|
17157
17202
|
});
|
|
17158
|
-
// If the oid in the index === working dir oid but stats differed update cache
|
|
17159
|
-
|
|
17203
|
+
// If the oid in the index === working dir oid but stats differed update cache.
|
|
17204
|
+
// An intent-to-add entry is left alone: inserting it again would stage it.
|
|
17205
|
+
if (
|
|
17206
|
+
refresh &&
|
|
17207
|
+
I &&
|
|
17208
|
+
!indexEntry.flags.intentToAdd &&
|
|
17209
|
+
indexEntry.oid === workdirOid
|
|
17210
|
+
) {
|
|
17160
17211
|
// and as long as our fs.stats aren't bad.
|
|
17161
17212
|
// size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers
|
|
17162
17213
|
// (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat
|
package/index.js
CHANGED
|
@@ -700,13 +700,25 @@ function parseCacheEntryFlags(bits) {
|
|
|
700
700
|
extended: Boolean(bits & 0b0100000000000000),
|
|
701
701
|
stage: (bits & 0b0011000000000000) >> 12,
|
|
702
702
|
nameLength: bits & 0b0000111111111111,
|
|
703
|
+
skipWorktree: false,
|
|
704
|
+
intentToAdd: false,
|
|
703
705
|
}
|
|
704
706
|
}
|
|
705
707
|
|
|
708
|
+
// Bits of the version 3 extended flags field that git understands:
|
|
709
|
+
// 1-bit reserved, 1-bit skip-worktree, 1-bit intent-to-add, 13 unused bits
|
|
710
|
+
const SKIP_WORKTREE = 0b0100000000000000;
|
|
711
|
+
const INTENT_TO_ADD = 0b0010000000000000;
|
|
712
|
+
|
|
713
|
+
function hasExtendedFlags(entry) {
|
|
714
|
+
return Boolean(entry.flags.skipWorktree || entry.flags.intentToAdd)
|
|
715
|
+
}
|
|
716
|
+
|
|
706
717
|
function renderCacheEntryFlags(entry) {
|
|
707
718
|
const flags = entry.flags;
|
|
708
|
-
// 1-bit extended flag
|
|
709
|
-
flags
|
|
719
|
+
// 1-bit extended flag, set only when the entry needs the extended
|
|
720
|
+
// flags field that version 3 adds
|
|
721
|
+
flags.extended = hasExtendedFlags(entry);
|
|
710
722
|
// 12-bit name length if the length is less than 0xFFF; otherwise 0xFFF
|
|
711
723
|
// is stored in this field.
|
|
712
724
|
flags.nameLength = Math.min(Buffer.from(entry.path).length, 0xfff);
|
|
@@ -718,6 +730,13 @@ function renderCacheEntryFlags(entry) {
|
|
|
718
730
|
)
|
|
719
731
|
}
|
|
720
732
|
|
|
733
|
+
function renderCacheEntryExtendedFlags(entry) {
|
|
734
|
+
return (
|
|
735
|
+
(entry.flags.skipWorktree ? SKIP_WORKTREE : 0) +
|
|
736
|
+
(entry.flags.intentToAdd ? INTENT_TO_ADD : 0)
|
|
737
|
+
)
|
|
738
|
+
}
|
|
739
|
+
|
|
721
740
|
class GitIndex {
|
|
722
741
|
/*::
|
|
723
742
|
_entries: Map<string, CacheEntry>
|
|
@@ -777,7 +796,7 @@ class GitIndex {
|
|
|
777
796
|
}
|
|
778
797
|
|
|
779
798
|
const version = reader.readUInt32BE();
|
|
780
|
-
if (version !== 2) {
|
|
799
|
+
if (version !== 2 && version !== 3) {
|
|
781
800
|
throw new InternalError(`Unsupported dircache version: ${version}`)
|
|
782
801
|
}
|
|
783
802
|
const numEntries = reader.readUInt32BE();
|
|
@@ -797,7 +816,16 @@ class GitIndex {
|
|
|
797
816
|
entry.oid = reader.slice(20).toString('hex');
|
|
798
817
|
const flags = reader.readUInt16BE();
|
|
799
818
|
entry.flags = parseCacheEntryFlags(flags);
|
|
800
|
-
|
|
819
|
+
if (entry.flags.extended) {
|
|
820
|
+
const extendedFlags = reader.readUInt16BE();
|
|
821
|
+
if (extendedFlags & ~(SKIP_WORKTREE | INTENT_TO_ADD)) {
|
|
822
|
+
throw new InternalError(
|
|
823
|
+
`Unknown index entry format: 0x${extendedFlags.toString(16)}`
|
|
824
|
+
)
|
|
825
|
+
}
|
|
826
|
+
entry.flags.skipWorktree = Boolean(extendedFlags & SKIP_WORKTREE);
|
|
827
|
+
entry.flags.intentToAdd = Boolean(extendedFlags & INTENT_TO_ADD);
|
|
828
|
+
}
|
|
801
829
|
const pathlength = buffer.indexOf(0, reader.tell() + 1) - reader.tell();
|
|
802
830
|
if (pathlength < 1) {
|
|
803
831
|
throw new InternalError(`Got a path length of: ${pathlength}`)
|
|
@@ -876,6 +904,9 @@ class GitIndex {
|
|
|
876
904
|
}
|
|
877
905
|
stats = normalizeStats(stats);
|
|
878
906
|
const bfilepath = Buffer.from(filepath);
|
|
907
|
+
// Keep the skip-worktree bit of a path outside the sparse checkout.
|
|
908
|
+
// Intent-to-add is cleared, since the path is now staged.
|
|
909
|
+
const existing = stage === 0 ? this._entries.get(filepath) : undefined;
|
|
879
910
|
const entry = {
|
|
880
911
|
ctimeSeconds: stats.ctimeSeconds,
|
|
881
912
|
ctimeNanoseconds: stats.ctimeNanoseconds,
|
|
@@ -897,6 +928,8 @@ class GitIndex {
|
|
|
897
928
|
extended: false,
|
|
898
929
|
stage,
|
|
899
930
|
nameLength: bfilepath.length < 0xfff ? bfilepath.length : 0xfff,
|
|
931
|
+
skipWorktree: Boolean(existing?.flags.skipWorktree),
|
|
932
|
+
intentToAdd: false,
|
|
900
933
|
},
|
|
901
934
|
stages: [],
|
|
902
935
|
};
|
|
@@ -940,8 +973,11 @@ class GitIndex {
|
|
|
940
973
|
|
|
941
974
|
static async _entryToBuffer(entry) {
|
|
942
975
|
const bpath = Buffer.from(entry.path);
|
|
943
|
-
|
|
944
|
-
|
|
976
|
+
const extended = hasExtendedFlags(entry);
|
|
977
|
+
// the fixed length + the extended flags (if any) + the filename + at
|
|
978
|
+
// least one null char => align by 8
|
|
979
|
+
const length =
|
|
980
|
+
Math.ceil((62 + (extended ? 2 : 0) + bpath.length + 1) / 8) * 8;
|
|
945
981
|
const written = Buffer.alloc(length);
|
|
946
982
|
const writer = new BufferCursor(written);
|
|
947
983
|
const stat = normalizeStats(entry);
|
|
@@ -957,6 +993,9 @@ class GitIndex {
|
|
|
957
993
|
writer.writeUInt32BE(stat.size);
|
|
958
994
|
writer.write(entry.oid, 20, 'hex');
|
|
959
995
|
writer.writeUInt16BE(renderCacheEntryFlags(entry));
|
|
996
|
+
if (extended) {
|
|
997
|
+
writer.writeUInt16BE(renderCacheEntryExtendedFlags(entry));
|
|
998
|
+
}
|
|
960
999
|
writer.write(entry.path, bpath.length, 'utf8');
|
|
961
1000
|
return written
|
|
962
1001
|
}
|
|
@@ -965,7 +1004,8 @@ class GitIndex {
|
|
|
965
1004
|
const header = Buffer.alloc(12);
|
|
966
1005
|
const writer = new BufferCursor(header);
|
|
967
1006
|
writer.write('DIRC', 4, 'utf8');
|
|
968
|
-
|
|
1007
|
+
// Like canonical git, only use version 3 when an entry needs it
|
|
1008
|
+
writer.writeUInt32BE(this.entriesFlat.some(hasExtendedFlags) ? 3 : 2);
|
|
969
1009
|
writer.writeUInt32BE(this.entriesFlat.length);
|
|
970
1010
|
|
|
971
1011
|
let entryBuffers = [];
|
|
@@ -5105,9 +5145,11 @@ class GitWalkerFs {
|
|
|
5105
5145
|
// 1) if we can (because the oid and mode are the same)
|
|
5106
5146
|
// 2) and only if we need to (because other stats differ)
|
|
5107
5147
|
// 3) and only if the caller opted in to refreshing the index
|
|
5148
|
+
// 4) and not for an intent-to-add entry, which inserting would stage
|
|
5108
5149
|
if (
|
|
5109
5150
|
self.refresh &&
|
|
5110
5151
|
stage &&
|
|
5152
|
+
!stage.flags.intentToAdd &&
|
|
5111
5153
|
oid === stage.oid &&
|
|
5112
5154
|
(!filemode || stats.mode === stage.mode) &&
|
|
5113
5155
|
compareStats(stats, stage, filemode, trustino)
|
|
@@ -6615,7 +6657,10 @@ async function _commit({
|
|
|
6615
6657
|
return GitIndexManager.acquire(
|
|
6616
6658
|
{ fs, gitdir, cache, allowUnmerged: false },
|
|
6617
6659
|
async function (index) {
|
|
6618
|
-
|
|
6660
|
+
// Entries added with `git add --intent-to-add` are not part of the tree
|
|
6661
|
+
const inodes = flatFileListToDirectoryStructure(
|
|
6662
|
+
index.entries.filter(entry => !entry.flags.intentToAdd)
|
|
6663
|
+
);
|
|
6619
6664
|
const inode = inodes.get('.');
|
|
6620
6665
|
if (!tree) {
|
|
6621
6666
|
tree = await constructTree({ fs, gitdir, inode, dryRun });
|
|
@@ -10197,8 +10242,8 @@ function filterCapabilities(server, client) {
|
|
|
10197
10242
|
|
|
10198
10243
|
const pkg = {
|
|
10199
10244
|
name: 'isomorphic-git',
|
|
10200
|
-
version: '1.44.
|
|
10201
|
-
agent: 'git/isomorphic-git@1.44.
|
|
10245
|
+
version: '1.44.7',
|
|
10246
|
+
agent: 'git/isomorphic-git@1.44.7',
|
|
10202
10247
|
};
|
|
10203
10248
|
|
|
10204
10249
|
class FIFO {
|
|
@@ -17142,8 +17187,14 @@ async function status({
|
|
|
17142
17187
|
type: 'blob',
|
|
17143
17188
|
object,
|
|
17144
17189
|
});
|
|
17145
|
-
// If the oid in the index === working dir oid but stats differed update cache
|
|
17146
|
-
|
|
17190
|
+
// If the oid in the index === working dir oid but stats differed update cache.
|
|
17191
|
+
// An intent-to-add entry is left alone: inserting it again would stage it.
|
|
17192
|
+
if (
|
|
17193
|
+
refresh &&
|
|
17194
|
+
I &&
|
|
17195
|
+
!indexEntry.flags.intentToAdd &&
|
|
17196
|
+
indexEntry.oid === workdirOid
|
|
17197
|
+
) {
|
|
17147
17198
|
// and as long as our fs.stats aren't bad.
|
|
17148
17199
|
// size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers
|
|
17149
17200
|
// (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat
|