Fossil Forum
Post: gdiff file paths seem incorrect
On macOS, fossil seems to provide incorrect file paths to gdiff..
eflisp e% fossil version
This is fossil version 2.28 [52445a27f1] 2026-03-11 11:31:46 UTC
eflisp e% fossil setting gdiff-command echo
eflisp e% fossil stash gdiff
CHANGED lib7/|init|/scheme/base.sld
/Volumes/evo2Te/dev/eflisp/lib7/|init|/scheme/base.sld /var/folders/5p/dnbwgr8x6hq4gvxb0_wctq680000gn/T//base~orig.sld
CHANGED efscm.boot
/Volumes/evo2Te/dev/eflisp/efscm.boot /var/folders/5p/dnbwgr8x6hq4gvxb0_wctq680000gn/T//efscm~orig.boot
CHANGED lib7/chibi/test.scm
/Volumes/evo2Te/dev/eflisp/lib7/chibi/test.scm /var/folders/5p/dnbwgr8x6hq4gvxb0_wctq680000gn/T//test~orig.scm
CHANGED r7expander.lsp
/Volumes/evo2Te/dev/eflisp/r7expander.lsp /var/folders/5p/dnbwgr8x6hq4gvxb0_wctq680000gn/T//r7expander~orig.lsp
eflisp e% ls /var/folders/5p/dnbwgr8x6hq4gvxb0_wctq680000gn/T//base~orig.sld
ls: /var/folders/5p/dnbwgr8x6hq4gvxb0_wctq680000gn/T//base~orig.sld: No such file or directory
eflisp e% ls /var/folders/5p/dnbwgr8x6hq4gvxb0_wctq680000gn/T/base~orig.sld
ls: /var/folders/5p/dnbwgr8x6hq4gvxb0_wctq680000gn/T/base~orig.sld: No such file or directory
This leads to errors in vscode when I use :
eflisp e% fossil setting gdiff-command 'code --diff'
eflisp e% fossil stash gdiff
This is just a guess, but...
eflisp e% fossil setting gdiff-command 'code --diff'
Are you absolutely sure that code does not run in the background? If it does, it will return immediately and fossil will delete the temp files, very possibly before code can get to the point of trying to render them. This has come up in the past with at least one third-party diff tool.
You can test that by simply running code --diff ... from your terminal. If the terminal stops and waits for code to exit then this may be a fossil bug. If instead your terminal immediately returns to input mode then the problem is with code.
Excellent guess.
I learned today that vscode has a --wait flag. So, the setting fossil needs is
fossil set gdiff-command 'code --wait --diff'
Thanks!