Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix scm history going out of sync after commit #12592

Conversation

erezmus
Copy link
Contributor

@erezmus erezmus commented Jun 2, 2023

What it does

How to test

  • open a git repository
  • change a file and commit it
  • switch to the history view
  • the commit should appear at the top

Review checklist

Reminder for reviewers

@erezmus erezmus force-pushed the 2922-git-history-not-synchronized branch from 1b684f3 to e34e9e8 Compare June 2, 2023 10:16
@vince-fugnitto vince-fugnitto added the git issues related to git label Jun 16, 2023
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

@erezmus thank you for the contribution, can you confirm if you are also seeing this bug which I experienced with the pull-request:

  • start the application with a workspace under git version control (I was on master)
  • make some changes
  • commit the changes
  • open the history-view and the new commit is present
  • in the terminal perform a hard reset (ex: git reset --hard origin/master)
  • the history-view will fail to show any history

Screen Shot 2023-06-16 at 8 37 18 AM

@erezmus
Copy link
Contributor Author

erezmus commented Jun 19, 2023

@vince-fugnitto correct, i can reproduce it. will fix

@erezmus erezmus force-pushed the 2922-git-history-not-synchronized branch from e34e9e8 to 939678d Compare June 19, 2023 09:53
@erezmus
Copy link
Contributor Author

erezmus commented Jun 19, 2023

Pushed a new fix and also added caching of avatars.

vince-fugnitto
vince-fugnitto previously approved these changes Jul 7, 2023
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

The updated changes look good to me 👍
Do you mind force pushing to restart the eca check (it seems to be hanging and is required).

history = history.slice(1);
}

const avatarCache = new Map<string, string>();
Copy link
Member

Choose a reason for hiding this comment

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

Your code never calls set on this cache. Is it an oversight, or am I missing something?

@msujew
Copy link
Member

msujew commented Aug 14, 2023

@erezmus Ping! Please address #12592 (comment).

@CareyJWilliams
Copy link
Contributor

CareyJWilliams commented Aug 16, 2023

@erezmus isn't likely to be available to address this until September. I put up another PR based off of this one that I believe makes the desired change: #12837

Though if we're happy to wait for him to return that is fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git issues related to git
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Git extension widgets "Git" and "Git History" not synchronized
4 participants