Repository navigation
WIP: 23797 git manage ignore files - #25718
Naveen Kumar (timbanaveen) wants to merge 2 commits into
Conversation
|
Naveen Kumar (@timbanaveen), thanks for your PR! By analyzing the history of the files in this pull request, we identified João Moreno (@joaomoreno) and Johannes Rieken (@jrieken) to be potential reviewers. |
|
Naveen Kumar (@timbanaveen), |
|
Hi João Moreno (@joaomoreno),
Is it possible to have test for this use cases ? |
João Moreno (joaomoreno)
left a comment
There was a problem hiding this comment.
Let's move the updating of the .gitignore file to go through the vscode applyEdit API instead of directly writing to disk.
| return true; | ||
| } | ||
|
|
||
| export async function createOrAppendFile(path: string, data: string, options?: any): Promise<boolean> { |
There was a problem hiding this comment.
I'd rather we go through the applyEdit vscode API, instead of raw node file editing.
There was a problem hiding this comment.
Hi João Moreno (@joaomoreno)
I tried with applyEdit API, applyEdit have following behavior
- opens .gitignore file and append data (without saving).
- If file is not present, there is an error, i am not able to find file creation API in case we want to create file.
- I thought we are going to create or append file silently, but above API uses worksapce hence it opens file first and then edit it. Also we need to have some mechanism to save this particular file while editing. I found
saveAllmethod but not save method.
please guide.
There was a problem hiding this comment.
Opening the file is the right thing to do. I want to user to be aware of what is happening. We should show him what is being done behind the scenes here. If the user has auto-save enabled, the file should be automatically saved, right Benjamin Pasero (@bpasero)?
There was a problem hiding this comment.
Yes, any change to the model is changed automatically if auto save is enabled. We open the file automatically in the background if a model becomes dirty and was not opened yet.
|
fyi - you can also add commands the explorer with the |
|
Naveen Kumar (@timbanaveen) are you still working on this? If you don't, can I take a look? |
|
bugrac , I am waiting for João Moreno (@joaomoreno) , actually needed some more information regrading VS APIs. |
|
João Moreno (@joaomoreno) I added the apply edit API here: #29243 on top of these changes. Please let me know if that works. |
|
Closing in favour of #29243, which contains these changes. |
Fix for #23797