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

feat: reuse a git repository when it was previously cloned #158

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

Angelmmiguel
Copy link
Contributor

Before, if wws detected that a repository was already cloned, it deleted the folder and clone it again. This PR changes this behavior. Now, it opens the repository and updates it to the given reference.

By default, it tries to fetch the changes in the default branch (main / master). If you provide a git reference, it fetches the data from the origin. In case you provide a commit, it pulls the default branch too.

It closes #155

@Angelmmiguel Angelmmiguel added the 🚀 enhancement New feature or request label Jun 19, 2023
@Angelmmiguel Angelmmiguel added this to the v1.3.0 milestone Jun 19, 2023
@Angelmmiguel Angelmmiguel requested a review from a team June 19, 2023 10:53
@Angelmmiguel Angelmmiguel self-assigned this Jun 19, 2023
Copy link
Contributor

@ereslibre ereslibre left a comment

Choose a reason for hiding this comment

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

LGTM

crates/project/src/types/git.rs Show resolved Hide resolved
Copy link
Contributor

@assambar assambar left a comment

Choose a reason for hiding this comment

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

Ship it!

crates/project/src/types/git.rs Show resolved Hide resolved
crates/project/src/types/git.rs Show resolved Hide resolved
@Angelmmiguel Angelmmiguel merged commit 8be904c into main Jun 20, 2023
@Angelmmiguel Angelmmiguel deleted the 155-reuse-git-repos branch June 30, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reuse existing git repositories
4 participants