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

Support staging for new files #78562

Merged
merged 2 commits into from Aug 12, 2019

Conversation

@OneThatWalks
Copy link
Contributor

commented Aug 6, 2019

Addresses #78046

@joaomoreno the real 'fix' or 'feature' was adding the --add arg to the update-index when an error was thrown by getObjectDetails(). This may not be the best way to go about this, but I recorded the behavior for this PR. The diff editor was utilized to get the context menu items to show up.

stagechanges

@msftclas

This comment has been minimized.

Copy link

commented Aug 6, 2019

CLA assistant check
All CLA requirements met.

@octref octref requested a review from joaomoreno Aug 6, 2019

@joaomoreno joaomoreno added the git label Aug 7, 2019

@joaomoreno joaomoreno added this to the Backlog milestone Aug 7, 2019

@joaomoreno
Copy link
Member

left a comment

Two problems I see:

  • When staging from untracked, the left hand side does not update at all.
  • When having a file half untracked, half staged, the left hand side of the untracked makes no sense, it has repeated lines
@OneThatWalks

This comment has been minimized.

Copy link
Contributor Author

commented Aug 8, 2019

Two problems I see:

* When staging from untracked, the left hand side does not update at all.

* When having a file half untracked, half staged, the left hand side of the untracked makes no sense, it has repeated lines

I'll do some digging here. I was wondering if the diff editor made sense to even use? At least for untracked files.

@joaomoreno

This comment has been minimized.

Copy link
Member

commented Aug 8, 2019

I think it still does:

  • For untracked files: on the left we should see the "index" version of the file: everything that is already staged.
  • For index added files: on the left we should always see an empty document.
@OneThatWalks

This comment has been minimized.

Copy link
Contributor Author

commented Aug 9, 2019

It looked like my git uri ref was incorrect for "untracked" files. I recorded the cases above working correctly.

The left side of an untracked file shows the staged changes, the contents update and make sense with the untracked changes.

The left side of a index add is always blank, and is updated on range stage changes.

stagechanges2

@joaomoreno joaomoreno merged commit 74a0865 into microsoft:master Aug 12, 2019

1 of 2 checks passed

VS Code #20190809.26 failed
Details
license/cla All CLA requirements met.
Details
@joaomoreno

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

Excellent, great fix! I've added a check for the thrown error to make sure we only catch that specific error. And debugging this actually made me catch another issue: #78949

Thanks! 🍻

@joaomoreno joaomoreno modified the milestones: Backlog, August 2019 Aug 12, 2019

@rawtaz

This comment has been minimized.

Copy link

commented Aug 12, 2019

Seriously quick work by you guys, fixing the original issue so quickly. Really nice!

@OneThatWalks OneThatWalks deleted the OneThatWalks:stageuntrackedrange branch Aug 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.