Support staging for new files#78562
Conversation
joaomoreno
left a comment
There was a problem hiding this 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
I'll do some digging here. I was wondering if the diff editor made sense to even use? At least for untracked files. |
|
I think it still does:
|
|
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. |
|
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! 🍻 |
|
Seriously quick work by you guys, fixing the original issue so quickly. Really nice! |

Addresses #78046
@joaomoreno the real 'fix' or 'feature' was adding the
--addarg to theupdate-indexwhen an error was thrown bygetObjectDetails(). 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.