isomorphic-git 1.26.3 → 1.26.5

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
@@ -376,6 +376,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
376
376
  <td align="center"><a href="https://github.com/lsegurado"><img src="https://avatars.githubusercontent.com/u/27731047?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Lucas Martin Segurado</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=lsegurado" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/issues?q=author%3Alsegurado" title="Bug reports">🐛</a></td>
377
377
  <td align="center"><a href="https://github.com/limond"><img src="https://avatars.githubusercontent.com/u/1025682?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Leon Kaucher</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=limond" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=limond" title="Tests">⚠️</a></td>
378
378
  <td align="center"><a href="https://github.com/gilisho"><img src="https://avatars.githubusercontent.com/u/40733156?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Gili Shohat</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=gilisho" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=gilisho" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=gilisho" title="Tests">⚠️</a></td>
379
+ <td align="center"><a href="https://github.com/hhourani27"><img src="https://avatars.githubusercontent.com/u/61935766?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Habib</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hhourani27" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hhourani27" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hhourani27" title="Tests">⚠️</a></td>
379
380
  </tr>
380
381
  </table>
381
382
 
@@ -1,10 +1,11 @@
1
1
  [
2
- "Chrome Headless 79.0.3945.0 (Linux x86_64)",
2
+ "X Chrome Headless 79.0.3945.0 (Linux x86_64)",
3
3
  "Firefox 126.0 (Ubuntu 0.0.0)",
4
4
  "X Chrome 123.0.0.0 (Android 10)",
5
- "Safari 13.1 (Mac OS 10.15.4)",
6
5
  "Edge 79.0.309.65 (Windows 10)",
6
+ "Safari 13.1 (Mac OS 10.15.4)",
7
7
  "Mobile Safari 13.0 (iOS 13.0)",
8
8
  "Chrome Headless 79.0.3945.0 (Linux x86_64)",
9
- "Chrome 123.0.0.0 (Android 10)"
9
+ "Chrome 123.0.0.0 (Android 10)",
10
+ "Edge 79.0.309.65 (Windows 10)"
10
11
  ]
package/index.cjs CHANGED
@@ -1565,6 +1565,7 @@ const SECTION_REGEX = /^[A-Za-z0-9-.]+$/;
1565
1565
  const VARIABLE_LINE_REGEX = /^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/;
1566
1566
  const VARIABLE_NAME_REGEX = /^[A-Za-z][A-Za-z-]*$/;
1567
1567
 
1568
+ // Comments start with either # or ; and extend to the end of line
1568
1569
  const VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/;
1569
1570
 
1570
1571
  const extractSectionLine = line => {
@@ -7451,8 +7452,8 @@ function filterCapabilities(server, client) {
7451
7452
 
7452
7453
  const pkg = {
7453
7454
  name: 'isomorphic-git',
7454
- version: '1.26.3',
7455
- agent: 'git/isomorphic-git@1.26.3',
7455
+ version: '1.26.5',
7456
+ agent: 'git/isomorphic-git@1.26.5',
7456
7457
  };
7457
7458
 
7458
7459
  class FIFO {
@@ -8574,6 +8575,12 @@ async function _deleteBranch({ fs, gitdir, ref }) {
8574
8575
 
8575
8576
  // Delete a specified branch
8576
8577
  await GitRefManager.deleteRef({ fs, gitdir, ref: fullRef });
8578
+
8579
+ // Delete branch config entries
8580
+ const abbrevRef = abbreviateRef(ref);
8581
+ const config = await GitConfigManager.get({ fs, gitdir });
8582
+ await config.deleteSection('branch', abbrevRef);
8583
+ await GitConfigManager.save({ fs, gitdir, config });
8577
8584
  }
8578
8585
 
8579
8586
  // @ts-check
@@ -12466,7 +12473,12 @@ async function _push({
12466
12473
  }
12467
12474
 
12468
12475
  // Update the local copy of the remote ref
12469
- if (remote && result.ok && result.refs[fullRemoteRef].ok) {
12476
+ if (
12477
+ remote &&
12478
+ result.ok &&
12479
+ result.refs[fullRemoteRef].ok &&
12480
+ !fullRef.startsWith('refs/tags')
12481
+ ) {
12470
12482
  // TODO: I think this should actually be using a refspec transform rather than assuming 'refs/remotes/{remote}'
12471
12483
  const ref = `refs/remotes/${remote}/${fullRemoteRef.replace(
12472
12484
  'refs/heads',
@@ -12513,7 +12525,7 @@ async function _push({
12513
12525
  * @param {PrePushCallback} [args.onPrePush] - optional pre-push hook callback
12514
12526
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
12515
12527
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
12516
- * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch.
12528
+ * @param {string} [args.ref] - Which branch or tag to push. By default this is the currently checked out branch.
12517
12529
  * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote.
12518
12530
  * @param {string} [args.remote] - If URL is not specified, determines which remote to use.
12519
12531
  * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch.
package/index.d.ts CHANGED
@@ -2463,7 +2463,7 @@ export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSucce
2463
2463
  * @param {PrePushCallback} [args.onPrePush] - optional pre-push hook callback
2464
2464
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
2465
2465
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2466
- * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch.
2466
+ * @param {string} [args.ref] - Which branch or tag to push. By default this is the currently checked out branch.
2467
2467
  * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote.
2468
2468
  * @param {string} [args.remote] - If URL is not specified, determines which remote to use.
2469
2469
  * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch.
package/index.js CHANGED
@@ -1559,6 +1559,7 @@ const SECTION_REGEX = /^[A-Za-z0-9-.]+$/;
1559
1559
  const VARIABLE_LINE_REGEX = /^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/;
1560
1560
  const VARIABLE_NAME_REGEX = /^[A-Za-z][A-Za-z-]*$/;
1561
1561
 
1562
+ // Comments start with either # or ; and extend to the end of line
1562
1563
  const VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/;
1563
1564
 
1564
1565
  const extractSectionLine = line => {
@@ -7445,8 +7446,8 @@ function filterCapabilities(server, client) {
7445
7446
 
7446
7447
  const pkg = {
7447
7448
  name: 'isomorphic-git',
7448
- version: '1.26.3',
7449
- agent: 'git/isomorphic-git@1.26.3',
7449
+ version: '1.26.5',
7450
+ agent: 'git/isomorphic-git@1.26.5',
7450
7451
  };
7451
7452
 
7452
7453
  class FIFO {
@@ -8568,6 +8569,12 @@ async function _deleteBranch({ fs, gitdir, ref }) {
8568
8569
 
8569
8570
  // Delete a specified branch
8570
8571
  await GitRefManager.deleteRef({ fs, gitdir, ref: fullRef });
8572
+
8573
+ // Delete branch config entries
8574
+ const abbrevRef = abbreviateRef(ref);
8575
+ const config = await GitConfigManager.get({ fs, gitdir });
8576
+ await config.deleteSection('branch', abbrevRef);
8577
+ await GitConfigManager.save({ fs, gitdir, config });
8571
8578
  }
8572
8579
 
8573
8580
  // @ts-check
@@ -12460,7 +12467,12 @@ async function _push({
12460
12467
  }
12461
12468
 
12462
12469
  // Update the local copy of the remote ref
12463
- if (remote && result.ok && result.refs[fullRemoteRef].ok) {
12470
+ if (
12471
+ remote &&
12472
+ result.ok &&
12473
+ result.refs[fullRemoteRef].ok &&
12474
+ !fullRef.startsWith('refs/tags')
12475
+ ) {
12464
12476
  // TODO: I think this should actually be using a refspec transform rather than assuming 'refs/remotes/{remote}'
12465
12477
  const ref = `refs/remotes/${remote}/${fullRemoteRef.replace(
12466
12478
  'refs/heads',
@@ -12507,7 +12519,7 @@ async function _push({
12507
12519
  * @param {PrePushCallback} [args.onPrePush] - optional pre-push hook callback
12508
12520
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
12509
12521
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
12510
- * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch.
12522
+ * @param {string} [args.ref] - Which branch or tag to push. By default this is the currently checked out branch.
12511
12523
  * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote.
12512
12524
  * @param {string} [args.remote] - If URL is not specified, determines which remote to use.
12513
12525
  * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch.
@@ -2463,7 +2463,7 @@ export function pull({ fs: _fs, http, onProgress, onMessage, onAuth, onAuthSucce
2463
2463
  * @param {PrePushCallback} [args.onPrePush] - optional pre-push hook callback
2464
2464
  * @param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
2465
2465
  * @param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
2466
- * @param {string} [args.ref] - Which branch to push. By default this is the currently checked out branch.
2466
+ * @param {string} [args.ref] - Which branch or tag to push. By default this is the currently checked out branch.
2467
2467
  * @param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote.
2468
2468
  * @param {string} [args.remote] - If URL is not specified, determines which remote to use.
2469
2469
  * @param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch.