isomorphic-git 1.30.3 → 1.31.1

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 CHANGED
@@ -388,6 +388,8 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
388
388
  <td align="center"><a href="https://github.com/lukecotter"><img src="https://avatars.githubusercontent.com/u/4013877?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Luke Cotter</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=lukecotter" title="Code">💻</a></td>
389
389
  <td align="center"><a href="https://tomlarkworthy.endpointservices.net/"><img src="https://avatars.githubusercontent.com/u/1848162?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Tom Larkworthy</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=tomlarkworthy" title="Documentation">📖</a></td>
390
390
  <td align="center"><a href="https://github.com/kofta999"><img src="https://avatars.githubusercontent.com/u/99273340?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Mostafa Mahmoud</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=kofta999" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=kofta999" title="Tests">⚠️</a> <a href="#question-kofta999" title="Answering Questions">💬</a></td>
391
+ <td align="center"><a href="https://github.com/ARBhosale"><img src="https://avatars.githubusercontent.com/u/26981417?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Aniket Bhosale</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ARBhosale" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ARBhosale" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=ARBhosale" title="Tests">⚠️</a></td>
392
+ <td align="center"><a href="https://github.com/gnillev"><img src="https://avatars.githubusercontent.com/u/8965094?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Mathias Nisted Velling</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=gnillev" title="Code">💻</a><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=gnillev" title="Tests">⚠️</a></td>
391
393
  </tr>
392
394
  </table>
393
395
 
@@ -3,6 +3,6 @@
3
3
  "Firefox 139.0 (Linux x86_64)",
4
4
  "Edge 79.0.309.65 (Windows 10)",
5
5
  "Chrome 135.0.0.0 (Android 10)",
6
- "Mobile Safari 14.0 (iOS 14.0.1)",
7
- "Safari 14.1 (Mac OS 10.15.7)"
6
+ "Safari 14.1 (Mac OS 10.15.7)",
7
+ "Mobile Safari 14.0 (iOS 14.0.1)"
8
8
  ]
package/index.cjs CHANGED
@@ -6291,6 +6291,8 @@ const worthWalking = (filepath, root) => {
6291
6291
  * @param {boolean} [args.dryRun]
6292
6292
  * @param {boolean} [args.force]
6293
6293
  * @param {boolean} [args.track]
6294
+ * @param {boolean} [args.nonBlocking]
6295
+ * @param {number} [args.batchSize]
6294
6296
  *
6295
6297
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
6296
6298
  *
@@ -6310,6 +6312,8 @@ async function _checkout({
6310
6312
  dryRun,
6311
6313
  force,
6312
6314
  track = true,
6315
+ nonBlocking = false,
6316
+ batchSize = 100,
6313
6317
  }) {
6314
6318
  // oldOid is defined only if onPostCheckout hook is attached
6315
6319
  let oldOid;
@@ -6442,10 +6446,10 @@ async function _checkout({
6442
6446
  if (method === 'rmdir' || method === 'rmdir-index') {
6443
6447
  const filepath = `${dir}/${fullpath}`;
6444
6448
  try {
6445
- if (method === 'rmdir-index') {
6446
- index.delete({ filepath: fullpath });
6449
+ if (method === 'rmdir') {
6450
+ await fs.rmdir(filepath);
6447
6451
  }
6448
- await fs.rmdir(filepath);
6452
+ index.delete({ filepath: fullpath });
6449
6453
  if (onProgress) {
6450
6454
  await onProgress({
6451
6455
  phase: 'Updating workdir',
@@ -6482,72 +6486,122 @@ async function _checkout({
6482
6486
  })
6483
6487
  );
6484
6488
 
6485
- await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index) {
6486
- await Promise.all(
6487
- ops
6488
- .filter(
6489
- ([method]) =>
6490
- method === 'create' ||
6491
- method === 'create-index' ||
6492
- method === 'update' ||
6493
- method === 'mkdir-index'
6494
- )
6495
- .map(async function([method, fullpath, oid, mode, chmod]) {
6496
- const filepath = `${dir}/${fullpath}`;
6497
- try {
6498
- if (method !== 'create-index' && method !== 'mkdir-index') {
6499
- const { object } = await _readObject({ fs, cache, gitdir, oid });
6500
- if (chmod) {
6501
- // Note: the mode option of fs.write only works when creating files,
6502
- // not updating them. Since the `fs` plugin doesn't expose `chmod` this
6503
- // is our only option.
6504
- await fs.rm(filepath);
6505
- }
6506
- if (mode === 0o100644) {
6507
- // regular file
6508
- await fs.write(filepath, object);
6509
- } else if (mode === 0o100755) {
6510
- // executable file
6511
- await fs.write(filepath, object, { mode: 0o777 });
6512
- } else if (mode === 0o120000) {
6513
- // symlink
6514
- await fs.writelink(filepath, object);
6515
- } else {
6516
- throw new InternalError(
6517
- `Invalid mode 0o${mode.toString(8)} detected in blob ${oid}`
6518
- )
6519
- }
6520
- }
6489
+ if (nonBlocking) {
6490
+ // Filter eligible operations first
6491
+ const eligibleOps = ops.filter(
6492
+ ([method]) =>
6493
+ method === 'create' ||
6494
+ method === 'create-index' ||
6495
+ method === 'update' ||
6496
+ method === 'mkdir-index'
6497
+ );
6521
6498
 
6522
- const stats = await fs.lstat(filepath);
6523
- // We can't trust the executable bit returned by lstat on Windows,
6524
- // so we need to preserve this value from the TREE.
6525
- // TODO: Figure out how git handles this internally.
6526
- if (mode === 0o100755) {
6527
- stats.mode = 0o755;
6528
- }
6529
- // Submodules are present in the git index but use a unique mode different from trees
6530
- if (method === 'mkdir-index') {
6531
- stats.mode = 0o160000;
6532
- }
6533
- index.insert({
6534
- filepath: fullpath,
6535
- stats,
6536
- oid,
6537
- });
6538
- if (onProgress) {
6539
- await onProgress({
6540
- phase: 'Updating workdir',
6541
- loaded: ++count,
6542
- total,
6543
- });
6544
- }
6545
- } catch (e) {
6546
- console.log(e);
6547
- }
6548
- })
6499
+ const updateWorkingDirResults = await batchAllSettled(
6500
+ 'Update Working Dir',
6501
+ eligibleOps.map(([method, fullpath, oid, mode, chmod]) => () =>
6502
+ updateWorkingDir({ fs, cache, gitdir, dir }, [
6503
+ method,
6504
+ fullpath,
6505
+ oid,
6506
+ mode,
6507
+ chmod,
6508
+ ])
6509
+ ),
6510
+ onProgress,
6511
+ batchSize
6549
6512
  );
6550
- });
6513
+
6514
+ await GitIndexManager.acquire(
6515
+ { fs, gitdir, cache, allowUnmerged: true },
6516
+ async function(index) {
6517
+ await batchAllSettled(
6518
+ 'Update Index',
6519
+ updateWorkingDirResults.map(([fullpath, oid, stats]) => () =>
6520
+ updateIndex({ index, fullpath, oid, stats })
6521
+ ),
6522
+ onProgress,
6523
+ batchSize
6524
+ );
6525
+ }
6526
+ );
6527
+ } else {
6528
+ await GitIndexManager.acquire(
6529
+ { fs, gitdir, cache, allowUnmerged: true },
6530
+ async function(index) {
6531
+ await Promise.all(
6532
+ ops
6533
+ .filter(
6534
+ ([method]) =>
6535
+ method === 'create' ||
6536
+ method === 'create-index' ||
6537
+ method === 'update' ||
6538
+ method === 'mkdir-index'
6539
+ )
6540
+ .map(async function([method, fullpath, oid, mode, chmod]) {
6541
+ const filepath = `${dir}/${fullpath}`;
6542
+ try {
6543
+ if (method !== 'create-index' && method !== 'mkdir-index') {
6544
+ const { object } = await _readObject({
6545
+ fs,
6546
+ cache,
6547
+ gitdir,
6548
+ oid,
6549
+ });
6550
+ if (chmod) {
6551
+ // Note: the mode option of fs.write only works when creating files,
6552
+ // not updating them. Since the `fs` plugin doesn't expose `chmod` this
6553
+ // is our only option.
6554
+ await fs.rm(filepath);
6555
+ }
6556
+ if (mode === 0o100644) {
6557
+ // regular file
6558
+ await fs.write(filepath, object);
6559
+ } else if (mode === 0o100755) {
6560
+ // executable file
6561
+ await fs.write(filepath, object, { mode: 0o777 });
6562
+ } else if (mode === 0o120000) {
6563
+ // symlink
6564
+ await fs.writelink(filepath, object);
6565
+ } else {
6566
+ throw new InternalError(
6567
+ `Invalid mode 0o${mode.toString(
6568
+ 8
6569
+ )} detected in blob ${oid}`
6570
+ )
6571
+ }
6572
+ }
6573
+
6574
+ const stats = await fs.lstat(filepath);
6575
+ // We can't trust the executable bit returned by lstat on Windows,
6576
+ // so we need to preserve this value from the TREE.
6577
+ // TODO: Figure out how git handles this internally.
6578
+ if (mode === 0o100755) {
6579
+ stats.mode = 0o755;
6580
+ }
6581
+ // Submodules are present in the git index but use a unique mode different from trees
6582
+ if (method === 'mkdir-index') {
6583
+ stats.mode = 0o160000;
6584
+ }
6585
+ index.insert({
6586
+ filepath: fullpath,
6587
+ stats,
6588
+ oid,
6589
+ });
6590
+ if (onProgress) {
6591
+ await onProgress({
6592
+ phase: 'Updating workdir',
6593
+ loaded: ++count,
6594
+ total,
6595
+ });
6596
+ }
6597
+ } catch (e) {
6598
+ console.log(e);
6599
+ }
6600
+ })
6601
+ );
6602
+ }
6603
+ );
6604
+ }
6551
6605
 
6552
6606
  if (onPostCheckout) {
6553
6607
  await onPostCheckout({
@@ -6726,7 +6780,7 @@ async function analyze({
6726
6780
  case '101': {
6727
6781
  switch (await stage.type()) {
6728
6782
  case 'tree': {
6729
- return ['rmdir', fullpath]
6783
+ return ['rmdir-index', fullpath]
6730
6784
  }
6731
6785
  case 'blob': {
6732
6786
  // Git checks that the workdir.oid === stage.oid before deleting file
@@ -6865,6 +6919,78 @@ async function analyze({
6865
6919
  })
6866
6920
  }
6867
6921
 
6922
+ async function updateIndex({ index, fullpath, stats, oid }) {
6923
+ try {
6924
+ index.insert({
6925
+ filepath: fullpath,
6926
+ stats,
6927
+ oid,
6928
+ });
6929
+ } catch (e) {
6930
+ console.warn(`Error inserting ${fullpath} into index:`, e);
6931
+ }
6932
+ }
6933
+ async function updateWorkingDir(
6934
+ { fs, cache, gitdir, dir },
6935
+ [method, fullpath, oid, mode, chmod]
6936
+ ) {
6937
+ const filepath = `${dir}/${fullpath}`;
6938
+ if (method !== 'create-index' && method !== 'mkdir-index') {
6939
+ const { object } = await _readObject({ fs, cache, gitdir, oid });
6940
+ if (chmod) {
6941
+ await fs.rm(filepath);
6942
+ }
6943
+ if (mode === 0o100644) {
6944
+ // regular file
6945
+ await fs.write(filepath, object);
6946
+ } else if (mode === 0o100755) {
6947
+ // executable file
6948
+ await fs.write(filepath, object, { mode: 0o777 });
6949
+ } else if (mode === 0o120000) {
6950
+ // symlink
6951
+ await fs.writelink(filepath, object);
6952
+ } else {
6953
+ throw new InternalError(
6954
+ `Invalid mode 0o${mode.toString(8)} detected in blob ${oid}`
6955
+ )
6956
+ }
6957
+ }
6958
+ const stats = await fs.lstat(filepath);
6959
+ if (mode === 0o100755) {
6960
+ stats.mode = 0o755;
6961
+ }
6962
+ if (method === 'mkdir-index') {
6963
+ stats.mode = 0o160000;
6964
+ }
6965
+ return [fullpath, oid, stats]
6966
+ }
6967
+
6968
+ async function batchAllSettled(operationName, tasks, onProgress, batchSize) {
6969
+ const results = [];
6970
+ try {
6971
+ for (let i = 0; i < tasks.length; i += batchSize) {
6972
+ const batch = tasks.slice(i, i + batchSize).map(task => task());
6973
+ const batchResults = await Promise.allSettled(batch);
6974
+ batchResults.forEach(result => {
6975
+ if (result.status === 'fulfilled') results.push(result.value);
6976
+ });
6977
+ if (onProgress) {
6978
+ await onProgress({
6979
+ phase: 'Updating workdir',
6980
+ loaded: i + batch.length,
6981
+ total: tasks.length,
6982
+ });
6983
+ }
6984
+ }
6985
+
6986
+ return results
6987
+ } catch (error) {
6988
+ console.error(`Error during ${operationName}: ${error}`);
6989
+ }
6990
+
6991
+ return results
6992
+ }
6993
+
6868
6994
  // @ts-check
6869
6995
 
6870
6996
  /**
@@ -6887,6 +7013,8 @@ async function analyze({
6887
7013
  * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes.
6888
7014
  * @param {boolean} [args.track = true] - If false, will not set the remote branch tracking information. Defaults to true.
6889
7015
  * @param {object} [args.cache] - a [cache](cache.md) object
7016
+ * @param {boolean} [args.nonBlocking = false] - If true, will use non-blocking file system operations to allow for better performance in certain environments (For example, in Browsers)
7017
+ * @param {number} [args.batchSize = 100] - If args.nonBlocking is true, batchSize is the number of files to process at a time avoid blocking the executing thread. The default value of 100 is a good starting point.
6890
7018
  *
6891
7019
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
6892
7020
  *
@@ -6936,6 +7064,8 @@ async function checkout({
6936
7064
  force = false,
6937
7065
  track = true,
6938
7066
  cache = {},
7067
+ nonBlocking = false,
7068
+ batchSize = 100,
6939
7069
  }) {
6940
7070
  try {
6941
7071
  assertParameter('fs', fs);
@@ -6958,6 +7088,8 @@ async function checkout({
6958
7088
  dryRun,
6959
7089
  force,
6960
7090
  track,
7091
+ nonBlocking,
7092
+ batchSize,
6961
7093
  })
6962
7094
  } catch (err) {
6963
7095
  err.caller = 'git.checkout';
@@ -7644,8 +7776,8 @@ function filterCapabilities(server, client) {
7644
7776
 
7645
7777
  const pkg = {
7646
7778
  name: 'isomorphic-git',
7647
- version: '1.30.3',
7648
- agent: 'git/isomorphic-git@1.30.3',
7779
+ version: '1.31.1',
7780
+ agent: 'git/isomorphic-git@1.31.1',
7649
7781
  };
7650
7782
 
7651
7783
  class FIFO {
@@ -8400,6 +8532,8 @@ async function _init({
8400
8532
  * @param {string[]} args.exclude
8401
8533
  * @param {boolean} args.relative
8402
8534
  * @param {Object<string, string>} args.headers
8535
+ * @param {boolean} [args.nonBlocking]
8536
+ * @param {number} [args.batchSize]
8403
8537
  *
8404
8538
  * @returns {Promise<void>} Resolves successfully when clone completes
8405
8539
  *
@@ -8428,6 +8562,8 @@ async function _clone({
8428
8562
  noCheckout,
8429
8563
  noTags,
8430
8564
  headers,
8565
+ nonBlocking,
8566
+ batchSize = 100,
8431
8567
  }) {
8432
8568
  try {
8433
8569
  await _init({ fs, gitdir });
@@ -8472,6 +8608,8 @@ async function _clone({
8472
8608
  ref,
8473
8609
  remote,
8474
8610
  noCheckout,
8611
+ nonBlocking,
8612
+ batchSize,
8475
8613
  });
8476
8614
  } catch (err) {
8477
8615
  // Remove partial local repository, see #1283
@@ -8513,6 +8651,8 @@ async function _clone({
8513
8651
  * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip.
8514
8652
  * @param {Object<string, string>} [args.headers = {}] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config
8515
8653
  * @param {object} [args.cache] - a [cache](cache.md) object
8654
+ * @param {boolean} [args.nonBlocking = false] - if true, checkout will happen non-blockingly (useful for long-running operations blocking the thread in browser environments)
8655
+ * @param {number} [args.batchSize = 100] - If args.nonBlocking is true, batchSize is the number of files to process at a time avoid blocking the executing thread. The default value of 100 is a good starting point.
8516
8656
  *
8517
8657
  * @returns {Promise<void>} Resolves successfully when clone completes
8518
8658
  *
@@ -8553,6 +8693,8 @@ async function clone({
8553
8693
  noTags = false,
8554
8694
  headers = {},
8555
8695
  cache = {},
8696
+ nonBlocking = false,
8697
+ batchSize = 100,
8556
8698
  }) {
8557
8699
  try {
8558
8700
  assertParameter('fs', fs);
@@ -8587,6 +8729,8 @@ async function clone({
8587
8729
  noCheckout,
8588
8730
  noTags,
8589
8731
  headers,
8732
+ nonBlocking,
8733
+ batchSize,
8590
8734
  })
8591
8735
  } catch (err) {
8592
8736
  err.caller = 'git.clone';
@@ -15312,7 +15456,7 @@ async function tag({
15312
15456
  * oid
15313
15457
  * })
15314
15458
  */
15315
- async function updateIndex({
15459
+ async function updateIndex$1({
15316
15460
  fs: _fs,
15317
15461
  dir,
15318
15462
  gitdir = pathBrowserify.join(dir, '.git'),
@@ -16182,7 +16326,7 @@ var index = {
16182
16326
  removeNote,
16183
16327
  renameBranch,
16184
16328
  resetIndex,
16185
- updateIndex,
16329
+ updateIndex: updateIndex$1,
16186
16330
  resolveRef,
16187
16331
  status,
16188
16332
  statusMatrix,
@@ -16260,7 +16404,7 @@ exports.stash = stash;
16260
16404
  exports.status = status;
16261
16405
  exports.statusMatrix = statusMatrix;
16262
16406
  exports.tag = tag;
16263
- exports.updateIndex = updateIndex;
16407
+ exports.updateIndex = updateIndex$1;
16264
16408
  exports.version = version;
16265
16409
  exports.walk = walk;
16266
16410
  exports.writeBlob = writeBlob;
package/index.d.ts CHANGED
@@ -681,7 +681,7 @@ declare namespace index {
681
681
  export { removeNote };
682
682
  export { renameBranch };
683
683
  export { resetIndex };
684
- export { updateIndex };
684
+ export { updateIndex$1 as updateIndex };
685
685
  export { resolveRef };
686
686
  export { status };
687
687
  export { statusMatrix };
@@ -993,6 +993,8 @@ export function branch({ fs, dir, gitdir, ref, object, checkout, force, }: {
993
993
  * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes.
994
994
  * @param {boolean} [args.track = true] - If false, will not set the remote branch tracking information. Defaults to true.
995
995
  * @param {object} [args.cache] - a [cache](cache.md) object
996
+ * @param {boolean} [args.nonBlocking = false] - If true, will use non-blocking file system operations to allow for better performance in certain environments (For example, in Browsers)
997
+ * @param {number} [args.batchSize = 100] - If args.nonBlocking is true, batchSize is the number of files to process at a time avoid blocking the executing thread. The default value of 100 is a good starting point.
996
998
  *
997
999
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
998
1000
  *
@@ -1027,7 +1029,7 @@ export function branch({ fs, dir, gitdir, ref, object, checkout, force, }: {
1027
1029
  * })
1028
1030
  * console.log('done')
1029
1031
  */
1030
- export function checkout({ fs, onProgress, onPostCheckout, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, track, cache, }: {
1032
+ export function checkout({ fs, onProgress, onPostCheckout, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, track, cache, nonBlocking, batchSize, }: {
1031
1033
  fs: FsClient;
1032
1034
  onProgress?: ProgressCallback | undefined;
1033
1035
  onPostCheckout?: PostCheckoutCallback | undefined;
@@ -1042,6 +1044,8 @@ export function checkout({ fs, onProgress, onPostCheckout, dir, gitdir, remote,
1042
1044
  force?: boolean | undefined;
1043
1045
  track?: boolean | undefined;
1044
1046
  cache?: object;
1047
+ nonBlocking?: boolean | undefined;
1048
+ batchSize?: number | undefined;
1045
1049
  }): Promise<void>;
1046
1050
  /**
1047
1051
  * Clone a repository
@@ -1070,6 +1074,8 @@ export function checkout({ fs, onProgress, onPostCheckout, dir, gitdir, remote,
1070
1074
  * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip.
1071
1075
  * @param {Object<string, string>} [args.headers = {}] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config
1072
1076
  * @param {object} [args.cache] - a [cache](cache.md) object
1077
+ * @param {boolean} [args.nonBlocking = false] - if true, checkout will happen non-blockingly (useful for long-running operations blocking the thread in browser environments)
1078
+ * @param {number} [args.batchSize = 100] - If args.nonBlocking is true, batchSize is the number of files to process at a time avoid blocking the executing thread. The default value of 100 is a good starting point.
1073
1079
  *
1074
1080
  * @returns {Promise<void>} Resolves successfully when clone completes
1075
1081
  *
@@ -1086,7 +1092,7 @@ export function checkout({ fs, onProgress, onPostCheckout, dir, gitdir, remote,
1086
1092
  * console.log('done')
1087
1093
  *
1088
1094
  */
1089
- export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, onPostCheckout, dir, gitdir, url, corsProxy, ref, remote, depth, since, exclude, relative, singleBranch, noCheckout, noTags, headers, cache, }: {
1095
+ export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, onPostCheckout, dir, gitdir, url, corsProxy, ref, remote, depth, since, exclude, relative, singleBranch, noCheckout, noTags, headers, cache, nonBlocking, batchSize, }: {
1090
1096
  fs: FsClient;
1091
1097
  http: HttpClient;
1092
1098
  onProgress?: ProgressCallback | undefined;
@@ -1112,6 +1118,8 @@ export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
1112
1118
  [x: string]: string;
1113
1119
  } | undefined;
1114
1120
  cache?: object;
1121
+ nonBlocking?: boolean | undefined;
1122
+ batchSize?: number | undefined;
1115
1123
  }): Promise<void>;
1116
1124
  /**
1117
1125
  * Create a new commit
@@ -3342,7 +3350,7 @@ export function tag({ fs: _fs, dir, gitdir, ref, object, force, }: {
3342
3350
  * oid
3343
3351
  * })
3344
3352
  */
3345
- export function updateIndex({ fs: _fs, dir, gitdir, cache, filepath, oid, mode, add, remove, force, }: {
3353
+ declare function updateIndex$1({ fs: _fs, dir, gitdir, cache, filepath, oid, mode, add, remove, force, }: {
3346
3354
  fs: FsClient;
3347
3355
  dir: string;
3348
3356
  gitdir?: string | undefined;
@@ -4650,3 +4658,4 @@ declare class BaseError extends Error {
4650
4658
  fromJSON(json: any): BaseError;
4651
4659
  get isIsomorphicGitError(): boolean;
4652
4660
  }
4661
+ export { updateIndex$1 as updateIndex };