@gitkraken/core-gitlens 0.38.3 → 0.39.0

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.
@@ -46,6 +46,13 @@ const nonInteractiveNetworkOptions = {
46
46
  },
47
47
  timeout: 1e4
48
48
  };
49
+ /** {@link nonInteractiveNetworkOptions} with the host's quiet-network `SSH_ASKPASS` environment, when it supplies one */
50
+ function quietNetworkOptions(git) {
51
+ return {
52
+ ...nonInteractiveNetworkOptions,
53
+ env: git.quietNetworkEnv(nonInteractiveNetworkOptions.env)
54
+ };
55
+ }
49
56
  /**
50
57
  * How long after a failed read of a remote's default branch off the network (an unreachable host, a refused login, a
51
58
  * timeout) the network isn't tried again for that remote
@@ -841,12 +848,12 @@ var BranchesGitSubProvider = class {
841
848
  return this.cache.getDefaultBranchName(repoPath, remote, async (commonPath, cacheable, signal) => {
842
849
  const failedKey = `${commonPath}\0${remote}`;
843
850
  let dropStamp = this.cache.getDropStamp("defaultBranchName", commonPath);
844
- const networkOptions = {
851
+ const networkOptions = () => ({
845
852
  cwd: commonPath,
846
853
  cancellation: signal ?? cancellation,
847
854
  ...priorityOpts,
848
- ...nonInteractiveNetworkOptions
849
- };
855
+ ...quietNetworkOptions(this.git)
856
+ });
850
857
  let retried = false;
851
858
  while (true) try {
852
859
  const result = await this.git.run({
@@ -870,13 +877,13 @@ var BranchesGitSubProvider = class {
870
877
  try {
871
878
  if (!retried) {
872
879
  retried = true;
873
- await this.git.run(networkOptions, "remote", "set-head", "-a", remote);
880
+ await this.git.run(networkOptions(), "remote", "set-head", "-a", remote);
874
881
  this.failedDefaultBranchLookups.release(failedKey);
875
882
  this.cache.deleteDefaultBranchName(commonPath, `${remote}:local`);
876
883
  dropStamp = this.cache.getDropStamp("defaultBranchName", commonPath);
877
884
  continue;
878
885
  }
879
- const result = await this.git.run(networkOptions, "ls-remote", "--symref", remote, "HEAD");
886
+ const result = await this.git.run(networkOptions(), "ls-remote", "--symref", remote, "HEAD");
880
887
  this.failedDefaultBranchLookups.release(failedKey);
881
888
  if (result.stdout) {
882
889
  const match = /ref:\s(\S+)\s+HEAD/m.exec(result.stdout);
@@ -909,7 +916,7 @@ var BranchesGitSubProvider = class {
909
916
  await this.git.run({
910
917
  cwd: repoPath,
911
918
  priority: "background",
912
- ...nonInteractiveNetworkOptions
919
+ ...quietNetworkOptions(this.git)
913
920
  }, "remote", "set-head", "-a", remote);
914
921
  this.cache.deleteDefaultBranchName(repoPath, `${remote}:local`);
915
922
  }