Ask questionsVS Code doesn't read Git packed-refs
VS Code doesn't seem to read the Git packed-refs file for remote branch information. It only looks in the .git/refs/remotes/origin folder but if the Git repository has a lot of seldom used branches then the hash for that branch will be in the packed-refs file and not in the above folder. Consequently, checking out one of those branches will lead to continuous file watcher errors. For example:
Failed to watch ref 'd:\apps\wwwroot\www\.git\refs\remotes\origin\[remote_branch_name]', is most likely packed. Error: ENOENT: no such file or directory, watch 'd:\apps\wwwroot\www\.git\refs\remotes\origin\john_ifims_remove_eforms' at FSWatcher.start (internal/fs/watchers.js:164:26) at Object.watch (fs.js:1232:11) at Object.t.watch (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:1:6950) at E.updateTransientWatchers (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:1:97463) at u.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:50:227) at T.updateModelState (c:\Program Files\Microsoft VS Code\resources\app\extensions\git\dist\main.js:1:114843)
VS Code has correctly guessed that the reference is packed but I'm not aware of any way to force Git to unpack references and I may not want to update the branch I've checked out and commit the change in order for Git to create the individual reference file into the refs/remotes/origin folder. This is either a bug or a feature request but I think VS Code should really have the ability to look for Git references in the packed-refs file.
Version: 1.37.1 (system setup) Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35 Date: 2019-08-15T16:17:55.855Z Electron: 4.2.7 Chrome: 69.0.3497.128 Node.js: 10.11.0 V8: 6.9.427.31-electron.0 OS: Windows_NT x64 10.0.17134
Answer questions joaomoreno
Got it. That error is only for file watching. It should not impact the features at all. Is there a feature which does not work?