"config push.default" and "remote show" called unnecessarily all the time when staged changes

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 3.4.24
    • Component/s: Git, remote
    • None
    • Severity 3 - Minor

      When there staging a file/hunk/line in sourcetree or if there are ANY staged changes:
      It runs `git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks config push.default` everytime - even if you just click on an unstaged file, it will run those, if there are any other staged changes.

      ```
       

      {     "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks config push.default",     "Directory": "redacted",     "Status": "Finished",     "Duration": "00:00:00.31",     "CallerContext": "GetGeneralConfig",     "Output": "current\n"   }

      ,
      ```

      This call slows things down unnecessarily by up to 0.3s (depending on hardware), since the push.default value is completely irrelevant at this point. No idea why it's called here in the first place.

      Same reproduction/issue also for "remote show", which is called here everytime unnecessarily:

      ```
        {
          "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks remote show -n origin",
          "Directory": "redacted",
          "Status": "Finished",
          "Duration": "00:00:00.1419947",
          "CallerContext": "GetRemoteInfo",
      ...
      ```

      In some cases even multiple times after each other

            Assignee:
            Unassigned
            Reporter:
            bablex
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: