isomorphic-git 1.7.6 → 1.8.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.
@@ -743,6 +743,7 @@ export function WORKDIR(): Walker;
743
743
  * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path
744
744
  * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
745
745
  * @param {string} args.filepath - The path to the file to add to the index
746
+ * @param {object} [args.cache] - a [cache](cache.md) object
746
747
  *
747
748
  * @returns {Promise<void>} Resolves successfully once the git index has been updated
748
749
  *
@@ -752,11 +753,12 @@ export function WORKDIR(): Walker;
752
753
  * console.log('done')
753
754
  *
754
755
  */
755
- export function add({ fs: _fs, dir, gitdir, filepath, }: {
756
+ export function add({ fs: _fs, dir, gitdir, filepath, cache, }: {
756
757
  fs: CallbackFsClient | PromiseFsClient;
757
758
  dir: string;
758
759
  gitdir?: string;
759
760
  filepath: string;
761
+ cache?: any;
760
762
  }): Promise<void>;
761
763
  /**
762
764
  * Add or update an object note
@@ -781,10 +783,11 @@ export function add({ fs: _fs, dir, gitdir, filepath, }: {
781
783
  * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).
782
784
  * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.
783
785
  * @param {string} [args.signingKey] - Sign the note commit using this private PGP key.
786
+ * @param {object} [args.cache] - a [cache](cache.md) object
784
787
  *
785
788
  * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the added note.
786
789
  */
787
- export function addNote({ fs: _fs, onSign, dir, gitdir, ref, oid, note, force, author: _author, committer: _committer, signingKey, }: {
790
+ export function addNote({ fs: _fs, onSign, dir, gitdir, ref, oid, note, force, author: _author, committer: _committer, signingKey, cache, }: {
788
791
  fs: CallbackFsClient | PromiseFsClient;
789
792
  onSign?: SignCallback;
790
793
  dir?: string;
@@ -806,6 +809,7 @@ export function addNote({ fs: _fs, onSign, dir, gitdir, ref, oid, note, force, a
806
809
  timezoneOffset?: number;
807
810
  };
808
811
  signingKey?: string;
812
+ cache?: any;
809
813
  }): Promise<string>;
810
814
  /**
811
815
  * Add or update a remote
@@ -857,6 +861,7 @@ export function addRemote({ fs, dir, gitdir, remote, url, force, }: {
857
861
  * @param {string} [args.gpgsig] - The gpgsig attatched to the tag object. (Mutually exclusive with the `signingKey` option.)
858
862
  * @param {string} [args.signingKey] - Sign the tag object using this private PGP key. (Mutually exclusive with the `gpgsig` option.)
859
863
  * @param {boolean} [args.force = false] - Instead of throwing an error if a tag named `ref` already exists, overwrite the existing tag. Note that this option does not modify the original tag object itself.
864
+ * @param {object} [args.cache] - a [cache](cache.md) object
860
865
  *
861
866
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
862
867
  *
@@ -874,7 +879,7 @@ export function addRemote({ fs, dir, gitdir, remote, url, force, }: {
874
879
  * console.log('done')
875
880
  *
876
881
  */
877
- export function annotatedTag({ fs: _fs, onSign, dir, gitdir, ref, tagger: _tagger, message, gpgsig, object, signingKey, force, }: {
882
+ export function annotatedTag({ fs: _fs, onSign, dir, gitdir, ref, tagger: _tagger, message, gpgsig, object, signingKey, force, cache, }: {
878
883
  fs: CallbackFsClient | PromiseFsClient;
879
884
  onSign?: SignCallback;
880
885
  dir?: string;
@@ -891,6 +896,7 @@ export function annotatedTag({ fs: _fs, onSign, dir, gitdir, ref, tagger: _tagge
891
896
  gpgsig?: string;
892
897
  signingKey?: string;
893
898
  force?: boolean;
899
+ cache?: any;
894
900
  }): Promise<void>;
895
901
  /**
896
902
  * Create a branch
@@ -933,6 +939,7 @@ export function branch({ fs, dir, gitdir, ref, checkout, }: {
933
939
  * @param {boolean} [args.noUpdateHead] - If true, will update the working directory but won't update HEAD. Defaults to `false` when `ref` is provided, and `true` if `ref` is not provided.
934
940
  * @param {boolean} [args.dryRun = false] - If true, simulates a checkout so you can test whether it would succeed.
935
941
  * @param {boolean} [args.force = false] - If true, conflicts will be ignored and files will be overwritten regardless of local changes.
942
+ * @param {object} [args.cache] - a [cache](cache.md) object
936
943
  *
937
944
  * @returns {Promise<void>} Resolves successfully when filesystem operations are complete
938
945
  *
@@ -967,7 +974,7 @@ export function branch({ fs, dir, gitdir, ref, checkout, }: {
967
974
  * })
968
975
  * console.log('done')
969
976
  */
970
- export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, }: {
977
+ export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filepaths, noCheckout, noUpdateHead, dryRun, force, cache, }: {
971
978
  fs: CallbackFsClient | PromiseFsClient;
972
979
  onProgress?: ProgressCallback;
973
980
  dir: string;
@@ -979,6 +986,7 @@ export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filep
979
986
  noUpdateHead?: boolean;
980
987
  dryRun?: boolean;
981
988
  force?: boolean;
989
+ cache?: any;
982
990
  }): Promise<void>;
983
991
  /**
984
992
  * Clone a repository
@@ -1005,6 +1013,7 @@ export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filep
1005
1013
  * @param {string[]} [args.exclude = []] - A list of branches or tags. Instructs the remote server not to send us any commits reachable from these refs.
1006
1014
  * @param {boolean} [args.relative = false] - Changes the meaning of `depth` to be measured from the current shallow depth rather than from the branch tip.
1007
1015
  * @param {Object<string, string>} [args.headers = {}] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config
1016
+ * @param {object} [args.cache] - a [cache](cache.md) object
1008
1017
  *
1009
1018
  * @returns {Promise<void>} Resolves successfully when clone completes
1010
1019
  *
@@ -1021,7 +1030,7 @@ export function checkout({ fs, onProgress, dir, gitdir, remote, ref: _ref, filep
1021
1030
  * console.log('done')
1022
1031
  *
1023
1032
  */
1024
- export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, url, corsProxy, ref, remote, depth, since, exclude, relative, singleBranch, noCheckout, noTags, headers, }: {
1033
+ export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, url, corsProxy, ref, remote, depth, since, exclude, relative, singleBranch, noCheckout, noTags, headers, cache, }: {
1025
1034
  fs: CallbackFsClient | PromiseFsClient;
1026
1035
  http: HttpClient;
1027
1036
  onProgress?: ProgressCallback;
@@ -1045,6 +1054,7 @@ export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
1045
1054
  headers?: {
1046
1055
  [x: string]: string;
1047
1056
  };
1057
+ cache?: any;
1048
1058
  }): Promise<void>;
1049
1059
  /**
1050
1060
  * Create a new commit
@@ -1071,6 +1081,7 @@ export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
1071
1081
  * @param {string} [args.ref] - The fully expanded name of the branch to commit to. Default is the current branch pointed to by HEAD. (TODO: fix it so it can expand branch names without throwing if the branch doesn't exist yet.)
1072
1082
  * @param {string[]} [args.parent] - The SHA-1 object ids of the commits to use as parents. If not specified, the commit pointed to by `ref` is used.
1073
1083
  * @param {string} [args.tree] - The SHA-1 object id of the tree to use. If not specified, a new tree object is created from the current git index.
1084
+ * @param {object} [args.cache] - a [cache](cache.md) object
1074
1085
  *
1075
1086
  * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the newly created commit.
1076
1087
  *
@@ -1087,7 +1098,7 @@ export function clone({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
1087
1098
  * console.log(sha)
1088
1099
  *
1089
1100
  */
1090
- export function commit({ fs: _fs, onSign, dir, gitdir, message, author: _author, committer: _committer, signingKey, dryRun, noUpdateBranch, ref, parent, tree, }: {
1101
+ export function commit({ fs: _fs, onSign, dir, gitdir, message, author: _author, committer: _committer, signingKey, dryRun, noUpdateBranch, ref, parent, tree, cache, }: {
1091
1102
  fs: CallbackFsClient | PromiseFsClient;
1092
1103
  onSign?: SignCallback;
1093
1104
  dir?: string;
@@ -1111,6 +1122,7 @@ export function commit({ fs: _fs, onSign, dir, gitdir, message, author: _author,
1111
1122
  ref?: string;
1112
1123
  parent?: string[];
1113
1124
  tree?: string;
1125
+ cache?: any;
1114
1126
  }): Promise<string>;
1115
1127
  /**
1116
1128
  * Get the name of the branch currently pointed to by .git/HEAD
@@ -1239,6 +1251,7 @@ export function deleteTag({ fs, dir, gitdir, ref }: {
1239
1251
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
1240
1252
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
1241
1253
  * @param {string} args.oid - The shortened oid prefix to expand (like "0414d2a")
1254
+ * @param {object} [args.cache] - a [cache](cache.md) object
1242
1255
  *
1243
1256
  * @returns {Promise<string>} Resolves successfully with the full oid (like "0414d2a286d7bbc7a4a326a61c1f9f888a8ab87f")
1244
1257
  *
@@ -1247,11 +1260,12 @@ export function deleteTag({ fs, dir, gitdir, ref }: {
1247
1260
  * console.log(oid)
1248
1261
  *
1249
1262
  */
1250
- export function expandOid({ fs, dir, gitdir, oid }: {
1263
+ export function expandOid({ fs, dir, gitdir, oid, cache, }: {
1251
1264
  fs: CallbackFsClient | PromiseFsClient;
1252
1265
  dir?: string;
1253
1266
  gitdir?: string;
1254
1267
  oid: string;
1268
+ cache?: any;
1255
1269
  }): Promise<string>;
1256
1270
  /**
1257
1271
  * Expand an abbreviated ref to its full name
@@ -1295,6 +1309,7 @@ export function expandRef({ fs, dir, gitdir, ref }: {
1295
1309
  * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.
1296
1310
  * @param {boolean} [args.singleBranch = false] - Instead of the default behavior of fetching all the branches, only fetch a single branch.
1297
1311
  * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config
1312
+ * @param {object} [args.cache] - a [cache](cache.md) object
1298
1313
  *
1299
1314
  * @returns {Promise<void>} Resolves successfully when pull operation completes
1300
1315
  *
@@ -1309,7 +1324,7 @@ export function expandRef({ fs, dir, gitdir, ref }: {
1309
1324
  * console.log('done')
1310
1325
  *
1311
1326
  */
1312
- export function fastForward({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, corsProxy, singleBranch, headers, }: {
1327
+ export function fastForward({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, corsProxy, singleBranch, headers, cache, }: {
1313
1328
  fs: CallbackFsClient | PromiseFsClient;
1314
1329
  http: HttpClient;
1315
1330
  onProgress?: ProgressCallback;
@@ -1328,6 +1343,7 @@ export function fastForward({ fs, http, onProgress, onMessage, onAuth, onAuthSuc
1328
1343
  headers?: {
1329
1344
  [x: string]: string;
1330
1345
  };
1346
+ cache?: any;
1331
1347
  }): Promise<void>;
1332
1348
  /**
1333
1349
  *
@@ -1366,6 +1382,7 @@ export function fastForward({ fs, http, onProgress, onMessage, onAuth, onAuthSuc
1366
1382
  * @param {boolean} [args.pruneTags] - Prune local tags that don’t exist on the remote, and force-update those tags that differ
1367
1383
  * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.
1368
1384
  * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config
1385
+ * @param {object} [args.cache] - a [cache](cache.md) object
1369
1386
  *
1370
1387
  * @returns {Promise<FetchResult>} Resolves successfully when fetch completes
1371
1388
  * @see FetchResult
@@ -1385,7 +1402,7 @@ export function fastForward({ fs, http, onProgress, onMessage, onAuth, onAuthSuc
1385
1402
  * console.log(result)
1386
1403
  *
1387
1404
  */
1388
- export function fetch({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, remote, remoteRef, url, corsProxy, depth, since, exclude, relative, tags, singleBranch, headers, prune, pruneTags, }: {
1405
+ export function fetch({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, remote, remoteRef, url, corsProxy, depth, since, exclude, relative, tags, singleBranch, headers, prune, pruneTags, cache, }: {
1389
1406
  fs: CallbackFsClient | PromiseFsClient;
1390
1407
  http: HttpClient;
1391
1408
  onProgress?: ProgressCallback;
@@ -1411,6 +1428,7 @@ export function fetch({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
1411
1428
  headers?: {
1412
1429
  [x: string]: string;
1413
1430
  };
1431
+ cache?: any;
1414
1432
  }): Promise<FetchResult>;
1415
1433
  /**
1416
1434
  * Find the merge base for a set of commits
@@ -1420,13 +1438,15 @@ export function fetch({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess,
1420
1438
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
1421
1439
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
1422
1440
  * @param {string[]} args.oids - Which commits
1441
+ * @param {object} [args.cache] - a [cache](cache.md) object
1423
1442
  *
1424
1443
  */
1425
- export function findMergeBase({ fs, dir, gitdir, oids, }: {
1444
+ export function findMergeBase({ fs, dir, gitdir, oids, cache, }: {
1426
1445
  fs: CallbackFsClient | PromiseFsClient;
1427
1446
  dir?: string;
1428
1447
  gitdir?: string;
1429
1448
  oids: string[];
1449
+ cache?: any;
1430
1450
  }): Promise<any[]>;
1431
1451
  /**
1432
1452
  * Find the root git directory
@@ -1654,6 +1674,7 @@ export function hashBlob({ object }: {
1654
1674
  * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path
1655
1675
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
1656
1676
  * @param {string} args.filepath - The path to the .pack file to index
1677
+ * @param {object} [args.cache] - a [cache](cache.md) object
1657
1678
  *
1658
1679
  * @returns {Promise<{oids: string[]}>} Resolves with a list of the SHA-1 object ids contained in the packfile
1659
1680
  *
@@ -1673,12 +1694,13 @@ export function hashBlob({ object }: {
1673
1694
  * console.log(oids)
1674
1695
  *
1675
1696
  */
1676
- export function indexPack({ fs, onProgress, dir, gitdir, filepath, }: {
1697
+ export function indexPack({ fs, onProgress, dir, gitdir, filepath, cache, }: {
1677
1698
  fs: CallbackFsClient | PromiseFsClient;
1678
1699
  onProgress?: ProgressCallback;
1679
1700
  dir: string;
1680
1701
  gitdir?: string;
1681
1702
  filepath: string;
1703
+ cache?: any;
1682
1704
  }): Promise<{
1683
1705
  oids: string[];
1684
1706
  }>;
@@ -1715,6 +1737,7 @@ export function init({ fs, bare, dir, gitdir, defaultBranch, }: {
1715
1737
  * @param {string} args.oid - The descendent commit
1716
1738
  * @param {string} args.ancestor - The (proposed) ancestor commit
1717
1739
  * @param {number} [args.depth = -1] - Maximum depth to search before giving up. -1 means no maximum depth.
1740
+ * @param {object} [args.cache] - a [cache](cache.md) object
1718
1741
  *
1719
1742
  * @returns {Promise<boolean>} Resolves to true if `oid` is a descendent of `ancestor`
1720
1743
  *
@@ -1725,13 +1748,14 @@ export function init({ fs, bare, dir, gitdir, defaultBranch, }: {
1725
1748
  * await git.isDescendent({ fs, dir: '/tutorial', oid, ancestor, depth: -1 })
1726
1749
  *
1727
1750
  */
1728
- export function isDescendent({ fs, dir, gitdir, oid, ancestor, depth, }: {
1751
+ export function isDescendent({ fs, dir, gitdir, oid, ancestor, depth, cache, }: {
1729
1752
  fs: CallbackFsClient | PromiseFsClient;
1730
1753
  dir?: string;
1731
1754
  gitdir?: string;
1732
1755
  oid: string;
1733
1756
  ancestor: string;
1734
1757
  depth?: number;
1758
+ cache?: any;
1735
1759
  }): Promise<boolean>;
1736
1760
  /**
1737
1761
  * List branches
@@ -1774,6 +1798,7 @@ export function listBranches({ fs, dir, gitdir, remote, }: {
1774
1798
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
1775
1799
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
1776
1800
  * @param {string} [args.ref] - Return a list of all the files in the commit at `ref` instead of the files currently in the git index (aka staging area)
1801
+ * @param {object} [args.cache] - a [cache](cache.md) object
1777
1802
  *
1778
1803
  * @returns {Promise<Array<string>>} Resolves successfully with an array of filepaths
1779
1804
  *
@@ -1786,11 +1811,12 @@ export function listBranches({ fs, dir, gitdir, remote, }: {
1786
1811
  * console.log(files)
1787
1812
  *
1788
1813
  */
1789
- export function listFiles({ fs, dir, gitdir, ref }: {
1814
+ export function listFiles({ fs, dir, gitdir, ref, cache, }: {
1790
1815
  fs: CallbackFsClient | PromiseFsClient;
1791
1816
  dir?: string;
1792
1817
  gitdir?: string;
1793
1818
  ref?: string;
1819
+ cache?: any;
1794
1820
  }): Promise<string[]>;
1795
1821
  /**
1796
1822
  * List all the object notes
@@ -1800,14 +1826,16 @@ export function listFiles({ fs, dir, gitdir, ref }: {
1800
1826
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
1801
1827
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
1802
1828
  * @param {string} [args.ref] - The notes ref to look under
1829
+ * @param {object} [args.cache] - a [cache](cache.md) object
1803
1830
  *
1804
1831
  * @returns {Promise<Array<{target: string, note: string}>>} Resolves successfully with an array of entries containing SHA-1 object ids of the note and the object the note targets
1805
1832
  */
1806
- export function listNotes({ fs, dir, gitdir, ref, }: {
1833
+ export function listNotes({ fs, dir, gitdir, ref, cache, }: {
1807
1834
  fs: CallbackFsClient | PromiseFsClient;
1808
1835
  dir?: string;
1809
1836
  gitdir?: string;
1810
1837
  ref?: string;
1838
+ cache?: any;
1811
1839
  }): Promise<{
1812
1840
  target: string;
1813
1841
  note: string;
@@ -1976,6 +2004,7 @@ export function listTags({ fs, dir, gitdir }: {
1976
2004
  * @param {string} [args.ref = 'HEAD'] - The commit to begin walking backwards through the history from
1977
2005
  * @param {number} [args.depth] - Limit the number of commits returned. No limit by default.
1978
2006
  * @param {Date} [args.since] - Return history newer than the given date. Can be combined with `depth` to get whichever is shorter.
2007
+ * @param {object} [args.cache] - a [cache](cache.md) object
1979
2008
  *
1980
2009
  * @returns {Promise<Array<ReadCommitResult>>} Resolves to an array of ReadCommitResult objects
1981
2010
  * @see ReadCommitResult
@@ -1991,13 +2020,14 @@ export function listTags({ fs, dir, gitdir }: {
1991
2020
  * console.log(commits)
1992
2021
  *
1993
2022
  */
1994
- export function log({ fs, dir, gitdir, ref, depth, since, }: {
2023
+ export function log({ fs, dir, gitdir, ref, depth, since, cache, }: {
1995
2024
  fs: CallbackFsClient | PromiseFsClient;
1996
2025
  dir?: string;
1997
2026
  gitdir?: string;
1998
2027
  ref?: string;
1999
2028
  depth?: number;
2000
2029
  since?: Date;
2030
+ cache?: any;
2001
2031
  }): Promise<ReadCommitResult[]>;
2002
2032
  /**
2003
2033
  *
@@ -2043,6 +2073,7 @@ export function log({ fs, dir, gitdir, ref, depth, since, }: {
2043
2073
  * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).
2044
2074
  * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.
2045
2075
  * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit
2076
+ * @param {object} [args.cache] - a [cache](cache.md) object
2046
2077
  *
2047
2078
  * @returns {Promise<MergeResult>} Resolves to a description of the merge operation
2048
2079
  * @see MergeResult
@@ -2057,7 +2088,7 @@ export function log({ fs, dir, gitdir, ref, depth, since, }: {
2057
2088
  * console.log(m)
2058
2089
  *
2059
2090
  */
2060
- export function merge({ fs: _fs, onSign, dir, gitdir, ours, theirs, fastForwardOnly, dryRun, noUpdateBranch, message, author: _author, committer: _committer, signingKey, }: {
2091
+ export function merge({ fs: _fs, onSign, dir, gitdir, ours, theirs, fastForwardOnly, dryRun, noUpdateBranch, message, author: _author, committer: _committer, signingKey, cache, }: {
2061
2092
  fs: CallbackFsClient | PromiseFsClient;
2062
2093
  onSign?: SignCallback;
2063
2094
  dir?: string;
@@ -2081,6 +2112,7 @@ export function merge({ fs: _fs, onSign, dir, gitdir, ours, theirs, fastForwardO
2081
2112
  timezoneOffset?: number;
2082
2113
  };
2083
2114
  signingKey?: string;
2115
+ cache?: any;
2084
2116
  }): Promise<MergeResult>;
2085
2117
  /**
2086
2118
  *
@@ -2097,6 +2129,7 @@ export function merge({ fs: _fs, onSign, dir, gitdir, ours, theirs, fastForwardO
2097
2129
  * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2098
2130
  * @param {string[]} args.oids - An array of SHA-1 object ids to be included in the packfile
2099
2131
  * @param {boolean} [args.write = false] - Whether to save the packfile to disk or not
2132
+ * @param {object} [args.cache] - a [cache](cache.md) object
2100
2133
  *
2101
2134
  * @returns {Promise<PackObjectsResult>} Resolves successfully when the packfile is ready with the filename and buffer
2102
2135
  * @see PackObjectsResult
@@ -2111,12 +2144,13 @@ export function merge({ fs: _fs, onSign, dir, gitdir, ours, theirs, fastForwardO
2111
2144
  * console.log(packfile)
2112
2145
  *
2113
2146
  */
2114
- export function packObjects({ fs, dir, gitdir, oids, write, }: {
2147
+ export function packObjects({ fs, dir, gitdir, oids, write, cache, }: {
2115
2148
  fs: CallbackFsClient | PromiseFsClient;
2116
2149
  dir?: string;
2117
2150
  gitdir?: string;
2118
2151
  oids: string[];
2119
2152
  write?: boolean;
2153
+ cache?: any;
2120
2154
  }): Promise<PackObjectsResult>;
2121
2155
  /**
2122
2156
  * Fetch and merge commits from a remote repository
@@ -2150,6 +2184,7 @@ export function packObjects({ fs, dir, gitdir, oids, write, }: {
2150
2184
  * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).
2151
2185
  * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.
2152
2186
  * @param {string} [args.signingKey] - passed to [commit](commit.md) when creating a merge commit
2187
+ * @param {object} [args.cache] - a [cache](cache.md) object
2153
2188
  *
2154
2189
  * @returns {Promise<void>} Resolves successfully when pull operation completes
2155
2190
  *
@@ -2164,7 +2199,7 @@ export function packObjects({ fs, dir, gitdir, oids, write, }: {
2164
2199
  * console.log('done')
2165
2200
  *
2166
2201
  */
2167
- export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, fastForwardOnly, corsProxy, singleBranch, headers, author: _author, committer: _committer, signingKey, }: {
2202
+ export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, url, remote, remoteRef, fastForwardOnly, corsProxy, singleBranch, headers, author: _author, committer: _committer, signingKey, cache, }: {
2168
2203
  fs: CallbackFsClient | PromiseFsClient;
2169
2204
  http: HttpClient;
2170
2205
  onProgress?: ProgressCallback;
@@ -2197,6 +2232,7 @@ export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSucce
2197
2232
  timezoneOffset?: number;
2198
2233
  };
2199
2234
  signingKey?: string;
2235
+ cache?: any;
2200
2236
  }): Promise<void>;
2201
2237
  /**
2202
2238
  * Push a branch or tag
@@ -2227,6 +2263,7 @@ export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSucce
2227
2263
  * @param {boolean} [args.delete = false] - If true, delete the remote ref
2228
2264
  * @param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.
2229
2265
  * @param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config
2266
+ * @param {object} [args.cache] - a [cache](cache.md) object
2230
2267
  *
2231
2268
  * @returns {Promise<PushResult>} Resolves successfully when push completes with a detailed description of the operation from the server.
2232
2269
  * @see PushResult
@@ -2244,7 +2281,7 @@ export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSucce
2244
2281
  * console.log(pushResult)
2245
2282
  *
2246
2283
  */
2247
- export function push({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, remoteRef, remote, url, force, delete: _delete, corsProxy, headers, }: {
2284
+ export function push({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, onAuthFailure, dir, gitdir, ref, remoteRef, remote, url, force, delete: _delete, corsProxy, headers, cache, }: {
2248
2285
  fs: CallbackFsClient | PromiseFsClient;
2249
2286
  http: HttpClient;
2250
2287
  onProgress?: ProgressCallback;
@@ -2264,6 +2301,7 @@ export function push({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, o
2264
2301
  headers?: {
2265
2302
  [x: string]: string;
2266
2303
  };
2304
+ cache?: any;
2267
2305
  }): Promise<PushResult>;
2268
2306
  /**
2269
2307
  *
@@ -2281,6 +2319,7 @@ export function push({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, o
2281
2319
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2282
2320
  * @param {string} args.oid - The SHA-1 object id to get. Annotated tags, commits, and trees are peeled.
2283
2321
  * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the blob object at that filepath.
2322
+ * @param {object} [args.cache] - a [cache](cache.md) object
2284
2323
  *
2285
2324
  * @returns {Promise<ReadBlobResult>} Resolves successfully with a blob object description
2286
2325
  * @see ReadBlobResult
@@ -2298,12 +2337,13 @@ export function push({ fs, http, onProgress, onMessage, onAuth, onAuthSuccess, o
2298
2337
  * console.log(Buffer.from(blob).toString('utf8'))
2299
2338
  *
2300
2339
  */
2301
- export function readBlob({ fs, dir, gitdir, oid, filepath, }: {
2340
+ export function readBlob({ fs, dir, gitdir, oid, filepath, cache, }: {
2302
2341
  fs: CallbackFsClient | PromiseFsClient;
2303
2342
  dir?: string;
2304
2343
  gitdir?: string;
2305
2344
  oid: string;
2306
2345
  filepath?: string;
2346
+ cache?: any;
2307
2347
  }): Promise<ReadBlobResult>;
2308
2348
  /**
2309
2349
  * Read a commit object directly
@@ -2313,6 +2353,7 @@ export function readBlob({ fs, dir, gitdir, oid, filepath, }: {
2313
2353
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
2314
2354
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2315
2355
  * @param {string} args.oid - The SHA-1 object id to get. Annotated tags are peeled.
2356
+ * @param {object} [args.cache] - a [cache](cache.md) object
2316
2357
  *
2317
2358
  * @returns {Promise<ReadCommitResult>} Resolves successfully with a git commit object
2318
2359
  * @see ReadCommitResult
@@ -2326,11 +2367,12 @@ export function readBlob({ fs, dir, gitdir, oid, filepath, }: {
2326
2367
  * console.log(commit)
2327
2368
  *
2328
2369
  */
2329
- export function readCommit({ fs, dir, gitdir, oid }: {
2370
+ export function readCommit({ fs, dir, gitdir, oid, cache, }: {
2330
2371
  fs: CallbackFsClient | PromiseFsClient;
2331
2372
  dir?: string;
2332
2373
  gitdir?: string;
2333
2374
  oid: string;
2375
+ cache?: any;
2334
2376
  }): Promise<ReadCommitResult>;
2335
2377
  /**
2336
2378
  * Read the contents of a note
@@ -2341,15 +2383,17 @@ export function readCommit({ fs, dir, gitdir, oid }: {
2341
2383
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2342
2384
  * @param {string} [args.ref] - The notes ref to look under
2343
2385
  * @param {string} args.oid - The SHA-1 object id of the object to get the note for.
2386
+ * @param {object} [args.cache] - a [cache](cache.md) object
2344
2387
  *
2345
2388
  * @returns {Promise<Uint8Array>} Resolves successfully with note contents as a Buffer.
2346
2389
  */
2347
- export function readNote({ fs, dir, gitdir, ref, oid, }: {
2390
+ export function readNote({ fs, dir, gitdir, ref, oid, cache, }: {
2348
2391
  fs: CallbackFsClient | PromiseFsClient;
2349
2392
  dir?: string;
2350
2393
  gitdir?: string;
2351
2394
  ref?: string;
2352
2395
  oid: string;
2396
+ cache?: any;
2353
2397
  }): Promise<Uint8Array>;
2354
2398
  /**
2355
2399
  *
@@ -2498,6 +2542,7 @@ export function readNote({ fs, dir, gitdir, ref, oid, }: {
2498
2542
  * @param {'deflated' | 'wrapped' | 'content' | 'parsed'} [args.format = 'parsed'] - What format to return the object in. The choices are described in more detail below.
2499
2543
  * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the object at that filepath. To return the root directory of a tree set filepath to `''`
2500
2544
  * @param {string} [args.encoding] - A convenience argument that only affects blobs. Instead of returning `object` as a buffer, it returns a string parsed using the given encoding.
2545
+ * @param {object} [args.cache] - a [cache](cache.md) object
2501
2546
  *
2502
2547
  * @returns {Promise<ReadObjectResult>} Resolves successfully with a git object description
2503
2548
  * @see ReadObjectResult
@@ -2529,7 +2574,7 @@ export function readNote({ fs, dir, gitdir, ref, oid, }: {
2529
2574
  * }
2530
2575
  *
2531
2576
  */
2532
- export function readObject({ fs: _fs, dir, gitdir, oid, format, filepath, encoding, }: {
2577
+ export function readObject({ fs: _fs, dir, gitdir, oid, format, filepath, encoding, cache, }: {
2533
2578
  fs: CallbackFsClient | PromiseFsClient;
2534
2579
  dir?: string;
2535
2580
  gitdir?: string;
@@ -2537,6 +2582,7 @@ export function readObject({ fs: _fs, dir, gitdir, oid, format, filepath, encodi
2537
2582
  format?: "parsed" | "deflated" | "content" | "wrapped";
2538
2583
  filepath?: string;
2539
2584
  encoding?: string;
2585
+ cache?: any;
2540
2586
  }): Promise<ParsedBlobObject | ParsedCommitObject | ParsedTreeObject | ParsedTagObject | DeflatedObject | WrappedObject | RawObject>;
2541
2587
  /**
2542
2588
  *
@@ -2553,17 +2599,19 @@ export function readObject({ fs: _fs, dir, gitdir, oid, format, filepath, encodi
2553
2599
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
2554
2600
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2555
2601
  * @param {string} args.oid - The SHA-1 object id to get
2602
+ * @param {object} [args.cache] - a [cache](cache.md) object
2556
2603
  *
2557
2604
  * @returns {Promise<ReadTagResult>} Resolves successfully with a git object description
2558
2605
  * @see ReadTagResult
2559
2606
  * @see TagObject
2560
2607
  *
2561
2608
  */
2562
- export function readTag({ fs, dir, gitdir, oid }: {
2609
+ export function readTag({ fs, dir, gitdir, oid, cache, }: {
2563
2610
  fs: CallbackFsClient | PromiseFsClient;
2564
2611
  dir?: string;
2565
2612
  gitdir?: string;
2566
2613
  oid: string;
2614
+ cache?: any;
2567
2615
  }): Promise<ReadTagResult>;
2568
2616
  /**
2569
2617
  *
@@ -2580,6 +2628,7 @@ export function readTag({ fs, dir, gitdir, oid }: {
2580
2628
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2581
2629
  * @param {string} args.oid - The SHA-1 object id to get. Annotated tags and commits are peeled.
2582
2630
  * @param {string} [args.filepath] - Don't return the object with `oid` itself, but resolve `oid` to a tree and then return the tree object at that filepath.
2631
+ * @param {object} [args.cache] - a [cache](cache.md) object
2583
2632
  *
2584
2633
  * @returns {Promise<ReadTreeResult>} Resolves successfully with a git tree object
2585
2634
  * @see ReadTreeResult
@@ -2587,12 +2636,13 @@ export function readTag({ fs, dir, gitdir, oid }: {
2587
2636
  * @see TreeEntry
2588
2637
  *
2589
2638
  */
2590
- export function readTree({ fs, dir, gitdir, oid, filepath, }: {
2639
+ export function readTree({ fs, dir, gitdir, oid, filepath, cache, }: {
2591
2640
  fs: CallbackFsClient | PromiseFsClient;
2592
2641
  dir?: string;
2593
2642
  gitdir?: string;
2594
2643
  oid: string;
2595
2644
  filepath?: string;
2645
+ cache?: any;
2596
2646
  }): Promise<ReadTreeResult>;
2597
2647
  /**
2598
2648
  * Remove a file from the git index (aka staging area)
@@ -2604,6 +2654,7 @@ export function readTree({ fs, dir, gitdir, oid, filepath, }: {
2604
2654
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
2605
2655
  * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2606
2656
  * @param {string} args.filepath - The path to the file to remove from the index
2657
+ * @param {object} [args.cache] - a [cache](cache.md) object
2607
2658
  *
2608
2659
  * @returns {Promise<void>} Resolves successfully once the git index has been updated
2609
2660
  *
@@ -2612,11 +2663,12 @@ export function readTree({ fs, dir, gitdir, oid, filepath, }: {
2612
2663
  * console.log('done')
2613
2664
  *
2614
2665
  */
2615
- export function remove({ fs: _fs, dir, gitdir, filepath, }: {
2666
+ export function remove({ fs: _fs, dir, gitdir, filepath, cache, }: {
2616
2667
  fs: CallbackFsClient | PromiseFsClient;
2617
2668
  dir?: string;
2618
2669
  gitdir?: string;
2619
2670
  filepath: string;
2671
+ cache?: any;
2620
2672
  }): Promise<void>;
2621
2673
  /**
2622
2674
  * Remove an object note
@@ -2639,10 +2691,11 @@ export function remove({ fs: _fs, dir, gitdir, filepath, }: {
2639
2691
  * @param {number} [args.committer.timestamp=Math.floor(Date.now()/1000)] - Set the committer timestamp field. This is the integer number of seconds since the Unix epoch (1970-01-01 00:00:00).
2640
2692
  * @param {number} [args.committer.timezoneOffset] - Set the committer timezone offset field. This is the difference, in minutes, from the current timezone to UTC. Default is `(new Date()).getTimezoneOffset()`.
2641
2693
  * @param {string} [args.signingKey] - Sign the tag object using this private PGP key.
2694
+ * @param {object} [args.cache] - a [cache](cache.md) object
2642
2695
  *
2643
2696
  * @returns {Promise<string>} Resolves successfully with the SHA-1 object id of the commit object for the note removal.
2644
2697
  */
2645
- export function removeNote({ fs: _fs, onSign, dir, gitdir, ref, oid, author: _author, committer: _committer, signingKey, }: {
2698
+ export function removeNote({ fs: _fs, onSign, dir, gitdir, ref, oid, author: _author, committer: _committer, signingKey, cache, }: {
2646
2699
  fs: CallbackFsClient | PromiseFsClient;
2647
2700
  onSign?: SignCallback;
2648
2701
  dir?: string;
@@ -2662,6 +2715,7 @@ export function removeNote({ fs: _fs, onSign, dir, gitdir, ref, oid, author: _au
2662
2715
  timezoneOffset?: number;
2663
2716
  };
2664
2717
  signingKey?: string;
2718
+ cache?: any;
2665
2719
  }): Promise<string>;
2666
2720
  /**
2667
2721
  * Rename a branch
@@ -2700,6 +2754,7 @@ export function renameBranch({ fs, dir, gitdir, ref, oldref, checkout, }: {
2700
2754
  * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2701
2755
  * @param {string} args.filepath - The path to the file to reset in the index
2702
2756
  * @param {string} [args.ref = 'HEAD'] - A ref to the commit to use
2757
+ * @param {object} [args.cache] - a [cache](cache.md) object
2703
2758
  *
2704
2759
  * @returns {Promise<void>} Resolves successfully once the git index has been updated
2705
2760
  *
@@ -2708,12 +2763,13 @@ export function renameBranch({ fs, dir, gitdir, ref, oldref, checkout, }: {
2708
2763
  * console.log('done')
2709
2764
  *
2710
2765
  */
2711
- export function resetIndex({ fs: _fs, dir, gitdir, filepath, ref, }: {
2766
+ export function resetIndex({ fs: _fs, dir, gitdir, filepath, ref, cache, }: {
2712
2767
  fs: CallbackFsClient | PromiseFsClient;
2713
2768
  dir?: string;
2714
2769
  gitdir?: string;
2715
2770
  filepath: string;
2716
2771
  ref?: string;
2772
+ cache?: any;
2717
2773
  }): Promise<void>;
2718
2774
  /**
2719
2775
  * Get the value of a symbolic ref or resolve a ref to its SHA-1 object id
@@ -2817,6 +2873,7 @@ export function setConfig({ fs: _fs, dir, gitdir, path, value, append, }: {
2817
2873
  * @param {string} args.dir - The [working tree](dir-vs-gitdir.md) directory path
2818
2874
  * @param {string} [args.gitdir=join(dir, '.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2819
2875
  * @param {string} args.filepath - The path to the file to query
2876
+ * @param {object} [args.cache] - a [cache](cache.md) object
2820
2877
  *
2821
2878
  * @returns {Promise<'ignored'|'unmodified'|'*modified'|'*deleted'|'*added'|'absent'|'modified'|'deleted'|'added'|'*unmodified'|'*absent'|'*undeleted'|'*undeletemodified'>} Resolves successfully with the file's git status
2822
2879
  *
@@ -2825,11 +2882,12 @@ export function setConfig({ fs: _fs, dir, gitdir, path, value, append, }: {
2825
2882
  * console.log(status)
2826
2883
  *
2827
2884
  */
2828
- export function status({ fs: _fs, dir, gitdir, filepath, }: {
2885
+ export function status({ fs: _fs, dir, gitdir, filepath, cache, }: {
2829
2886
  fs: CallbackFsClient | PromiseFsClient;
2830
2887
  dir: string;
2831
2888
  gitdir?: string;
2832
2889
  filepath: string;
2890
+ cache?: any;
2833
2891
  }): Promise<"modified" | "ignored" | "unmodified" | "*modified" | "*deleted" | "*added" | "absent" | "deleted" | "added" | "*unmodified" | "*absent" | "*undeleted" | "*undeletemodified">;
2834
2892
  /**
2835
2893
  * Efficiently get the status of multiple files at once.
@@ -2966,17 +3024,19 @@ export function status({ fs: _fs, dir, gitdir, filepath, }: {
2966
3024
  * @param {string} [args.ref = 'HEAD'] - Optionally specify a different commit to compare against the workdir and stage instead of the HEAD
2967
3025
  * @param {string[]} [args.filepaths = ['.']] - Limit the query to the given files and directories
2968
3026
  * @param {function(string): boolean} [args.filter] - Filter the results to only those whose filepath matches a function.
3027
+ * @param {object} [args.cache] - a [cache](cache.md) object
2969
3028
  *
2970
3029
  * @returns {Promise<Array<StatusRow>>} Resolves with a status matrix, described below.
2971
3030
  * @see StatusRow
2972
3031
  */
2973
- export function statusMatrix({ fs: _fs, dir, gitdir, ref, filepaths, filter, }: {
3032
+ export function statusMatrix({ fs: _fs, dir, gitdir, ref, filepaths, filter, cache, }: {
2974
3033
  fs: CallbackFsClient | PromiseFsClient;
2975
3034
  dir: string;
2976
3035
  gitdir?: string;
2977
3036
  ref?: string;
2978
3037
  filepaths?: string[];
2979
3038
  filter?: (arg0: string) => boolean;
3039
+ cache?: any;
2980
3040
  }): Promise<[string, 0 | 1, 0 | 1 | 2, 0 | 1 | 2 | 3][]>;
2981
3041
  /**
2982
3042
  * Create a lightweight tag
@@ -3252,10 +3312,11 @@ export function version(): string;
3252
3312
  * @param {WalkerMap} [args.map] - Transform `WalkerEntry`s into a result form
3253
3313
  * @param {WalkerReduce} [args.reduce] - Control how mapped entries are combined with their parent result
3254
3314
  * @param {WalkerIterate} [args.iterate] - Fine-tune how entries within a tree are iterated over
3315
+ * @param {object} [args.cache] - a [cache](cache.md) object
3255
3316
  *
3256
3317
  * @returns {Promise<any>} The finished tree-walking result
3257
3318
  */
3258
- export function walk({ fs, dir, gitdir, trees, map, reduce, iterate, }: {
3319
+ export function walk({ fs, dir, gitdir, trees, map, reduce, iterate, cache, }: {
3259
3320
  fs: CallbackFsClient | PromiseFsClient;
3260
3321
  dir?: string;
3261
3322
  gitdir?: string;
@@ -3263,6 +3324,7 @@ export function walk({ fs, dir, gitdir, trees, map, reduce, iterate, }: {
3263
3324
  map?: WalkerMap;
3264
3325
  reduce?: WalkerReduce;
3265
3326
  iterate?: WalkerIterate;
3327
+ cache?: any;
3266
3328
  }): Promise<any>;
3267
3329
  /**
3268
3330
  * Write a blob object directly