Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Reset the repository before rebasing it. #69

Merged
merged 1 commit into from
Mar 15, 2016

Conversation

twasyl
Copy link
Contributor

@twasyl twasyl commented Mar 11, 2016

When the repository has been modified (even if it shouldn't), simply doing a git rebase --quiet won't update the repository and a message of type my.file : needs update is generated by the command. The codebrag's UI will no more display new commits because the repository is not updated.
Adding a git reset --hard before the rebase ensure all changes are erased and the repository is clean again and the UI reflects the new changes again.

…es and prevent the repository not to be updated
@@ -7,6 +7,7 @@ import com.softwaremill.codebrag.repository.config.{RepoData, UserPassCredential

class GitSvnRepository(val repoData: RepoData) extends Repository with RepositoryAutoBuilder with GitSvnBranchesModel {

private val CommandBaseReset = "git reset --hard"
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be git svn reset --hard? This classes handles SVN repos vi Git

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, I tried it but it wasn't working so I ended up this way. I thought it wasn't really problematic since it is a 'restore' command for the repo. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Tested locally and looks good

lukaszlenart added a commit that referenced this pull request Mar 15, 2016
Reset the repository before rebasing it.
@lukaszlenart lukaszlenart merged commit 7a17678 into softwaremill:master Mar 15, 2016
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.

2 participants