isomorphic-git 1.36.1 → 1.36.3
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 +2 -1
- package/index.cjs +15 -7
- package/index.js +15 -7
- package/index.umd.min.js +1 -1
- package/index.umd.min.js.map +1 -1
- package/managers/index.cjs +8 -3
- package/managers/index.js +8 -3
- package/package.json +1 -1
package/managers/index.cjs
CHANGED
|
@@ -5387,9 +5387,14 @@ class GitWalkerFs {
|
|
|
5387
5387
|
if ((await entry.type()) === 'tree') {
|
|
5388
5388
|
entry._content = undefined;
|
|
5389
5389
|
} else {
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5390
|
+
let content;
|
|
5391
|
+
if ((await entry.mode()) >> 12 === 0b1010) {
|
|
5392
|
+
content = await fs.readlink(`${dir}/${entry._fullpath}`);
|
|
5393
|
+
} else {
|
|
5394
|
+
const config = await this._getGitConfig(fs, gitdir);
|
|
5395
|
+
const autocrlf = await config.get('core.autocrlf');
|
|
5396
|
+
content = await fs.read(`${dir}/${entry._fullpath}`, { autocrlf });
|
|
5397
|
+
}
|
|
5393
5398
|
// workaround for a BrowserFS edge case
|
|
5394
5399
|
entry._actualSize = content.length;
|
|
5395
5400
|
if (entry._stat && entry._stat.size === -1) {
|
package/managers/index.js
CHANGED
|
@@ -5381,9 +5381,14 @@ class GitWalkerFs {
|
|
|
5381
5381
|
if ((await entry.type()) === 'tree') {
|
|
5382
5382
|
entry._content = undefined;
|
|
5383
5383
|
} else {
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5384
|
+
let content;
|
|
5385
|
+
if ((await entry.mode()) >> 12 === 0b1010) {
|
|
5386
|
+
content = await fs.readlink(`${dir}/${entry._fullpath}`);
|
|
5387
|
+
} else {
|
|
5388
|
+
const config = await this._getGitConfig(fs, gitdir);
|
|
5389
|
+
const autocrlf = await config.get('core.autocrlf');
|
|
5390
|
+
content = await fs.read(`${dir}/${entry._fullpath}`, { autocrlf });
|
|
5391
|
+
}
|
|
5387
5392
|
// workaround for a BrowserFS edge case
|
|
5388
5393
|
entry._actualSize = content.length;
|
|
5389
5394
|
if (entry._stat && entry._stat.size === -1) {
|