Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Conversation

@fmeum
Copy link
Member

@fmeum fmeum commented Aug 12, 2020

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates

📜 Description

We should only create a single SSH session per GitOperation to reduce overhead and prevent repeated password prompts without bandaid solution and I finally figured out how to do it.

Along the way, a subtle bug is fixed that can lead to Git operations continuing after an error has been encountered.

💡 Motivation and Context

Would greatly improve the usability of #995 with security tokens and simplifies the code considerably.

💚 How did you test it?

I synced and cancelled password prompts and everything worked as expected.

📝 Checklist

  • I formatted the code with the IDE's reformat action (Ctrl + Shift + L/Cmd + Shift + L)
  • I reviewed submitted code
  • I added a CHANGELOG entry if applicable

🔮 Next steps

📸 Screenshots / GIFs

@fmeum fmeum changed the title Enhancement/multiple ssh commands Create only one SSH session per GitOperation Aug 12, 2020
@fmeum
Copy link
Member Author

fmeum commented Aug 12, 2020

I'm still surprised this works as per hierynomus/sshj#584 (comment), so please try to break it.

@msfjarvis
Copy link
Member

I'm still surprised this works as per hierynomus/sshj#584 (comment), so please try to break it.

Oh? Hold off the merge then I'll try some of my broken-ish servers.

@fmeum
Copy link
Member Author

fmeum commented Aug 12, 2020

Oh? Hold off the merge then I'll try some of my broken-ish servers.

Thanks!

On a slightly different note: While testing, I discovered that we currently always create a sync commit, even if it's empty (see android-password-store/pass-test@cd23dab). This is not a big problem, but unnecessarily complicates the Git history. Is this something that would be easy to change?

@msfjarvis
Copy link
Member

Oh? Hold off the merge then I'll try some of my broken-ish servers.

Thanks!

On a slightly different note: While testing, I discovered that we currently always create a sync commit, even if it's empty (see android-password-store/pass-test@cd23dab). This is not a big problem, but unnecessarily complicates the Git history. Is this something that would be easy to change?

Yeah I'll take a look, shouldn't be impossible.

@msfjarvis msfjarvis merged commit 4e8da9b into develop Aug 12, 2020
@msfjarvis msfjarvis deleted the enhancement/multiple_ssh_commands branch August 12, 2020 14:41
@msfjarvis msfjarvis added this to the 1.11.0 milestone Aug 12, 2020
@msfjarvis msfjarvis added the code label Aug 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants