microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.89k stars 29.52k forks source link

vs code configured git difftool not showing accurate files/diff #232461

Closed bantucaravan closed 1 month ago

bantucaravan commented 1 month ago

We have written the needed data into your clipboard because it was too large to send. Please paste. Type: Bug

A python function that should appear in the diff (and does appear in the git diff output) is not appearing in the vs code diff when vs code is configured as difftool. I tried both inline and 2 pane. The function is in an init.py file

I have 2 branches, diverged. I git checked out some files from one into the other and then committed those files. I also have an active git stash. Git log below.

The command that had the incorrect behavior: git difftool d375f2878d6f4 main -- app/backend/lib/__init__.py The same incorrect output behavior occurred with : git difftool working main -- app/backend/lib/__init__.py

These are my globally configured difftool settings

core.editor=code --wait
diff.tool=default-difftool
difftool.default-difftool.cmd=code --wait --diff $LOCAL $REMOTE
merge.tool=code
mergetool.code.cmd=code --wait --merge $REMOTE $LOCAL $BASE $MERGED

git log

*   commit d86bee3fbff171c7349fc70b225a3bc8e3ab8c8d (refs/stash)
|\  Merge: a7eeb35 9b02142
| | Author: Noah Chasek-Macfoy <bantucaravan@gmail.com>
| | Date:   Tue Oct 29 05:32:26 2024 +0100
| | 
| |     WIP on main: a7eeb35 feat[front- and back-end]: skills eval
| | 
| * commit 9b021424e72eeb4ebe6b107695793237c8be2e55
|/  Author: Noah Chasek-Macfoy <bantucaravan@gmail.com>
|   Date:   Tue Oct 29 05:32:26 2024 +0100
|   
|       index on main: a7eeb35 feat[front- and back-end]: skills eval
| 
* commit a7eeb35006c10f564f7f450d24c5907024de0451 (HEAD -> main)
| Author: Noah Chasek-Macfoy <bantucaravan@gmail.com>
| Date:   Tue Oct 29 04:32:35 2024 +0100
| 
|     feat[front- and back-end]: skills eval
|     
|     front end:
|     - add nice pretty display of skills eval
|     - including skill highlighted version of resumes
|     with dropdown select
|     
|     backend:
|     - skills_eval.py
|     - changed jd skills extraction to LLM based approach
| 
* commit 51a78d4da333e25b28ff5a2da4e99dbe4a322d21
| Author: Noah Chasek-Macfoy <bantucaravan@gmail.com>
| Date:   Wed Sep 4 00:57:56 2024 -0400
| 
|     fixes bug revising .docx files
|     
|     the function to read in .docx text was not correctly
|     imported, and secondarily did not handle https file
|     inputs
|   
| * commit d375f2878d6f456bbd94dd4694379ab70968ac1e (working)
|/  Author: Noah Chasek-Macfoy <bantucaravan@gmail.com>
|   Date:   Tue Oct 29 03:50:11 2024 +0100
|   
|       work in progress
|       
|       check point created to help me insert via rebase
|       a deployed version I forgot to commit previously
|       
|       skills_eval.py  - created separate file to organize work
|       
|       diff.py - work in progress separating out paragraph based
|       diffing tools from resume schema diffing tools

I do have the message:

The git repository at "job-hacker" has too many active changes, only a subset of Git features will be enabled.

VS Code version: Code 1.94.0 (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z) OS version: Darwin arm64 23.2.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 x 2400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|3, 3, 3| |Memory (System)|16.00GB (0.05GB free)| |Process Argv|--crash-reporter-id 56f60ee9-8ec2-4c77-b007-d2f73f9a3658| |Screen Reader|no| |VM|0%|
Extensions (39) Extension|Author (truncated)|Version ---|---|--- vscode-sql-formatter|adp|1.4.4 read-only-indicator|ale|3.10.0 npm-intellisense|chr|1.4.5 copilot|Git|1.241.0 copilot-chat|Git|0.21.2 gc-excelviewer|Gra|4.2.62 vscode-edit-csv|jan|0.10.0 rainbow-csv|mec|3.12.0 azure-dev|ms-|0.8.3 vscode-azureappservice|ms-|0.25.4 vscode-azurecontainerapps|ms-|0.7.1 vscode-azurefunctions|ms-|1.15.4 vscode-azureresourcegroups|ms-|0.9.7 vscode-azurestaticwebapps|ms-|0.12.2 vscode-azurestorage|ms-|0.16.1 vscode-azurevirtualmachines|ms-|0.6.6 vscode-cosmosdb|ms-|0.23.0 vscode-docker|ms-|1.29.3 data-workspace-vscode|ms-|0.5.0 mssql|ms-|1.24.0 sql-bindings-vscode|ms-|0.4.0 sql-database-projects-vscode|ms-|1.4.3 debugpy|ms-|2024.12.0 python|ms-|2024.16.1 vscode-pylance|ms-|2024.10.1 jupyter|ms-|2024.9.1 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.19 vscode-jupyter-cell-tags|ms-|0.1.9 vscode-jupyter-slideshow|ms-|0.1.6 azure-account|ms-|0.12.0 makefile-tools|ms-|0.11.13 vscode-node-azure-pack|ms-|1.2.0 neuron-IPE|neu|1.0.4 vscode-xml|red|0.27.1 r|REd|2.8.4 vscode-fileutils|sle|3.10.3 snowflake-vsc|sno|1.10.3 code-spell-checker|str|3.0.1
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 vscaat:30438848 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 g316j359:31013175 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 nativerepl2:31139839 refactort:31108082 pythonrstrctxt:31112756 flighttreat:31134774 wkspc-onlycs-t:31132770 wkspc-ranged-t:31151552 cf971741:31144450 defaultse:31146405 iacca2:31150323 notype1cf:31151524 5fd0e150:31146321 ```
vs-code-engineering[bot] commented 1 month ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.94.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

bantucaravan commented 1 month ago

I upgraded and the problem persists:

Version: 1.94.2 Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427 Date: 2024-10-09T16:08:44.566Z Electron: 30.5.1 ElectronBuildId: 10262041 Chromium: 124.0.6367.243 Node.js: 20.16.0 V8: 12.4.254.20-electron.0 OS: Darwin arm64 23.2.0

bantucaravan commented 1 month ago

Actually, this is my error interpreting the diff. I didn't realize that the text search bar when in inline diff mode only searches the content of the destination (second) document (some what confusing behavior), and there are separate search bars for both source (first) and destination (second) docs when in 2-pane view.