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.
@@ -5387,9 +5387,14 @@ class GitWalkerFs {
5387
5387
  if ((await entry.type()) === 'tree') {
5388
5388
  entry._content = undefined;
5389
5389
  } else {
5390
- const config = await this._getGitConfig(fs, gitdir);
5391
- const autocrlf = await config.get('core.autocrlf');
5392
- const content = await fs.read(`${dir}/${entry._fullpath}`, { autocrlf });
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
- const config = await this._getGitConfig(fs, gitdir);
5385
- const autocrlf = await config.get('core.autocrlf');
5386
- const content = await fs.read(`${dir}/${entry._fullpath}`, { autocrlf });
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isomorphic-git",
3
- "version": "1.36.1",
3
+ "version": "1.36.3",
4
4
  "description": "A pure JavaScript reimplementation of git for node and browsers",
5
5
  "type": "module",
6
6
  "typings": "./index.d.cts",