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

Conversation

@msfjarvis
Copy link
Member

@msfjarvis msfjarvis commented Apr 21, 2020

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Don't clear https_password when updateUrl is called for the first time. Fixed #725.

💡 Motivation and Context

when updateUrl is first called, it tries to fill previousUrl with the class variable
url but since url is going to be initialized later in this method, previousUrl is
left empty. This has the unfortunate side affect that our logic to remove saved HTTPS
password on hostname change is always triggered in this first pass of updateUrl, resulting
in users always being prompted for their password.

💚 How did you test it?

Manually verify HTTPS password is correctly persisted on future invocations of GitOperation.

📝 Checklist

  • I ran ./gradlew spotlessApply before submitting the PR
  • I reviewed submitted code

🔮 Next steps

R E L E A S E

📸 Screenshots / GIFs

if previousUrl is empty it means that this the first time the method is being called, and url
has not been built yet. We let things slide for the first pass so that the actual logic
only kicks in when it needs to.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@msfjarvis msfjarvis self-assigned this Apr 21, 2020
@msfjarvis msfjarvis requested a review from fmeum April 21, 2020 10:11
@msfjarvis msfjarvis added this to the v1.7.0 milestone Apr 21, 2020
Copy link
Member

@fmeum fmeum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just about to bring this up as a potential root cause to look into. Glad you found and fixed it!

@msfjarvis msfjarvis merged commit 77096c1 into master Apr 21, 2020
@msfjarvis msfjarvis deleted the bug/https-passphrase-persist branch April 21, 2020 11:20
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.

HTTPS password not being persisted correctly

3 participants