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

Add checkout inline to SCM view #324

Merged
merged 8 commits into from
Apr 26, 2021
Merged

Add checkout inline to SCM view #324

merged 8 commits into from
Apr 26, 2021

Conversation

mattseddon
Copy link
Member

@mattseddon mattseddon commented Apr 26, 2021

This PR adds removes checkoutRecursive, replaces it with checkoutTarget and wires up checkout and checkoutTarget with our SCM view (as per #318).

Another screen recording below

Screen.Recording.2021-04-26.at.3.51.21.pm.mov

As you can see I used the "discard" icon to try and fit in with the git extension. I also added the command inline into the scm/title to show that we can do this. That is prime real estate so we'll have to decide the most commonly used functions to go in there.

LMK if you have any questions.

@mattseddon mattseddon marked this pull request as draft April 26, 2021 05:16
@mattseddon mattseddon self-assigned this Apr 26, 2021
@@ -16,6 +17,7 @@ const runTargetCommand = async (

const target = basename(fsPath)
const commandWithTarget = buildCommand(command, target)
await ensureDir(cwd)
Copy link
Member Author

Choose a reason for hiding this comment

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

[F] There was a bug causing the underlying command to fail if the whole directory had been deleted.

@@ -112,31 +111,6 @@ describe('checkout', () => {
})
})

describe('checkoutRecursive', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

[F] This is the default behaviour of checkout when a target is not specified.

@mattseddon mattseddon marked this pull request as ready for review April 26, 2021 05:58
@mattseddon mattseddon requested a review from rogermparent April 26, 2021 05:58
Copy link
Contributor

@rogermparent rogermparent left a comment

Choose a reason for hiding this comment

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

Great change!

@mattseddon mattseddon merged commit 59af253 into master Apr 26, 2021
@mattseddon mattseddon deleted the add-checkout-inline branch April 26, 2021 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants