isomorphic-git 1.38.6 → 1.38.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.
@@ -4919,13 +4919,19 @@ function parseBuffer(buffer) {
4919
4919
  // "." and ".." (which resolve outside the working directory), and ".git" (which git
4920
4920
  // disallows as a path component). Checks mirror git's is_ntfs_dotgit() and
4921
4921
  // is_hfs_dotgit(): case-insensitive, trailing dots/spaces stripped (NTFS),
4922
- // NTFS 8.3 short name aliases (git~1..git~9), and HFS+ ignorable Unicode
4923
- // characters stripped (zero-width joiners, directional marks, BOM, etc.).
4922
+ // NTFS 8.3 short name aliases (git~1..git~9), NTFS Alternate Data Streams, and
4923
+ // HFS+ ignorable Unicode characters stripped (zero-width joiners, directional
4924
+ // marks, BOM, etc.).
4924
4925
  const hfsClean = path.replace(
4925
4926
  /[\u200C-\u200F\u202A-\u202E\u206A-\u206F\uFEFF]/g,
4926
4927
  ''
4927
4928
  );
4928
- const normalized = hfsClean.toLowerCase().replace(/[. ]+$/, '');
4929
+ // NTFS Alternate Data Streams are referenced as `<name>:<stream>:<type>`, and a
4930
+ // directory's default stream lets `.git::$INDEX_ALLOCATION` resolve to the `.git`
4931
+ // directory itself. git forbids *any* ADS, so only the portion before the first
4932
+ // colon names the actual entry we normalize and check.
4933
+ const ntfsClean = hfsClean.split(':')[0];
4934
+ const normalized = ntfsClean.toLowerCase().replace(/[. ]+$/, '');
4929
4935
  if (
4930
4936
  path.includes('\\') ||
4931
4937
  path.includes('/') ||
package/managers/index.js CHANGED
@@ -4906,13 +4906,19 @@ function parseBuffer(buffer) {
4906
4906
  // "." and ".." (which resolve outside the working directory), and ".git" (which git
4907
4907
  // disallows as a path component). Checks mirror git's is_ntfs_dotgit() and
4908
4908
  // is_hfs_dotgit(): case-insensitive, trailing dots/spaces stripped (NTFS),
4909
- // NTFS 8.3 short name aliases (git~1..git~9), and HFS+ ignorable Unicode
4910
- // characters stripped (zero-width joiners, directional marks, BOM, etc.).
4909
+ // NTFS 8.3 short name aliases (git~1..git~9), NTFS Alternate Data Streams, and
4910
+ // HFS+ ignorable Unicode characters stripped (zero-width joiners, directional
4911
+ // marks, BOM, etc.).
4911
4912
  const hfsClean = path.replace(
4912
4913
  /[\u200C-\u200F\u202A-\u202E\u206A-\u206F\uFEFF]/g,
4913
4914
  ''
4914
4915
  );
4915
- const normalized = hfsClean.toLowerCase().replace(/[. ]+$/, '');
4916
+ // NTFS Alternate Data Streams are referenced as `<name>:<stream>:<type>`, and a
4917
+ // directory's default stream lets `.git::$INDEX_ALLOCATION` resolve to the `.git`
4918
+ // directory itself. git forbids *any* ADS, so only the portion before the first
4919
+ // colon names the actual entry we normalize and check.
4920
+ const ntfsClean = hfsClean.split(':')[0];
4921
+ const normalized = ntfsClean.toLowerCase().replace(/[. ]+$/, '');
4916
4922
  if (
4917
4923
  path.includes('\\') ||
4918
4924
  path.includes('/') ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isomorphic-git",
3
- "version": "1.38.6",
3
+ "version": "1.38.7",
4
4
  "description": "A pure JavaScript reimplementation of git for node and browsers",
5
5
  "type": "module",
6
6
  "typings": "./index.d.cts",