daff icon indicating copy to clipboard operation
daff copied to clipboard

Git Diff :: ENOENT error

Open Sebastien-Meiffren opened this issue 9 years ago • 10 comments

I've just installed the NPM version (1.3.17) of the app. I'm trying to run a git diff between two commits BUT I have the following error :

Error: ENOENT: no such file or directory, open 'C:\Users\chuiv\PhpstormProjects\
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at Object.tio.getContent (C:\Users\chuiv\AppData\Roaming\npm\node_modules\da
    at Object.coopy.Coopy.loadTable (C:\Users\chuiv\AppData\Roaming\npm\node_mod
    at Object.coopy.Coopy.run (C:\Users\chuiv\AppData\Roaming\npm\node_modules\d
    at Object.coopy.Coopy.coopyhx (C:\Users\chuiv\AppData\Roaming\npm\node_modul
    at run_daff_base (C:\Users\chuiv\AppData\Roaming\npm\node_modules\daff\bin\d
    at Object.exports.run_daff_main (C:\Users\chuiv\AppData\Roaming\npm\node_mod
bin\daff.js:8817:14)
fatal: external diff died, stopping at DiscountRates/Additional_parameters.csv

Do you know why ?

Sebastien-Meiffren avatar Jun 15 '16 12:06 Sebastien-Meiffren

Hmm, it is dying trying to open a file, but I'm not sure why. Any chance you could get an untruncated version of that error message? I would specifically like to see the rest of 'C:\Users\chuiv\PhpstormProjects\ to get the full filename. Also could you let me know your git --version?

paulfitz avatar Jun 15 '16 13:06 paulfitz

Here is the full version :

$ git diff a628cd5c 5cc8d9c0
--- a/DiscountRates/Additional_parameters.csv
+++ b/DiscountRates/Additional_parameters.csv
C:\Users\chuiv\AppData\Roaming\npm\node_modules\daff\bin\daff.js:8831
                throw(e);
                ^

Error: ENOENT: no such file or directory, open 'C:\Users\chuiv\PhpstormProjects\bil-matrix\nul'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at Object.tio.getContent (C:\Users\chuiv\AppData\Roaming\npm\node_modules\daff\bin\daff.js:8650:15)
    at Object.coopy.Coopy.loadTable (C:\Users\chuiv\AppData\Roaming\npm\node_modules\daff\bin\daff.js:1763:21)
    at Object.coopy.Coopy.run (C:\Users\chuiv\AppData\Roaming\npm\node_modules\daff\bin\daff.js:2208:16)
    at Object.coopy.Coopy.coopyhx (C:\Users\chuiv\AppData\Roaming\npm\node_modules\daff\bin\daff.js:2244:15)
    at run_daff_base (C:\Users\chuiv\AppData\Roaming\npm\node_modules\daff\bin\daff.js:8782:18)
    at Object.exports.run_daff_main (C:\Users\chuiv\AppData\Roaming\npm\node_modules\daff\bin\daff.js:8799:13)
    at Object.<anonymous> (C:\Users\chuiv\AppData\Roaming\npm\node_modules\daff\bin\daff.js:8817:14)
fatal: external diff died, stopping at DiscountRates/Additional_parameters.csv

Sebastien-Meiffren avatar Jun 15 '16 14:06 Sebastien-Meiffren

Thanks @Sebastien-Meiffren, one more thing, could I get your git --version?

paulfitz avatar Jun 15 '16 21:06 paulfitz

2.5.0 for Windows ... hum I feel outdated ... can this be the reason ?

Sebastien-Meiffren avatar Jun 17 '16 06:06 Sebastien-Meiffren

Hmm checked git versions before and after that version and they appear working. Wondering if there's something different in Windows to check. What is the full path to DiscountRates/Additional_parameters.csv? Trying to figure out how that could get garbled to C:\Users\chuiv\PhpstormProjects\bil-matrix\nul

paulfitz avatar Jun 17 '16 21:06 paulfitz

Just tried Git for Windows 2.5.0, diffs worked fine for me. Not sure what else to try.

paulfitz avatar Jun 18 '16 02:06 paulfitz

@Sebastien-Meiffren if there are any non-ascii characters in your path, it may be worth upgrading your version of git for windows and trying again.

paulfitz avatar Jun 18 '16 02:06 paulfitz

Hi,
No none ASCII in the path.
Full path is : C:\Users\chuiv\PhpstormProjects\bil-matrix\DiscountRates/Additional_parameters.csv

Sebastien-Meiffren avatar Jun 20 '16 11:06 Sebastien-Meiffren

Hmm sorry, I've tried to replicate your situation as precisely as I can, with git version 2.5.0.windows.1, running from either "git cmd" or "git bash". All I can suggest is trying an upgrade? Paths can be tricky in mixed windows/unix stuff.

paulfitz avatar Jun 20 '16 13:06 paulfitz

I just did the update, no luck => still the same :( But thanks for your kind help (I can't send you the files for privacy reasons)

Sebastien-Meiffren avatar Jun 20 '16 14:06 Sebastien-Meiffren