Beispiel #1
0
 internal void SetSelectedAdapter(int index, bool deletePasswords)
 {
     if (index >= adapters.Length || index < 0)
     {
         gitManager.Repository.Config.Set("credential.helper", "");
         if (deletePasswords)
         {
             ResetSelectedAdapter(selectedAdapter);
         }
         gitSettings.CredentialsManager = "";
         gitSettings.MarkDirty();
         selectedAdapterIndex = -1;
         selectedAdapter      = null;
         return;
     }
     selectedAdapterIndex           = index;
     selectedAdapter                = adapters[index];
     gitSettings.CredentialsManager = GetAdapterId(selectedAdapter);
     gitManager.Repository.Config.Set("credential.helper", GetAdapterId(selectedAdapter));
     gitSettings.MarkDirty();
 }
        private void ToggleReadFromFile(GitDiffWindow window)
        {
            if (gitSettings.ReadFromFile)
            {
                gitSettings.ReadFromFile = false;
                window.ReadCommitMessage();
            }
            else
            {
                gitSettings.ReadFromFile = true;
                window.ReadCommitMessageFromFile();
            }

            gitSettings.MarkDirty();
        }