paulfitz / daff

align and compare tables
https://paulfitz.github.io/daff
MIT License
801 stars 67 forks source link

Git Diff :: ENOENT error #68

Open Sebastien-Meiffren opened 8 years ago

Sebastien-Meiffren commented 8 years ago

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 ?

paulfitz commented 8 years ago

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?

Sebastien-Meiffren commented 8 years ago

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
paulfitz commented 8 years ago

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

Sebastien-Meiffren commented 8 years ago

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

paulfitz commented 8 years ago

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 commented 8 years ago

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

paulfitz commented 8 years ago

@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.

Sebastien-Meiffren commented 8 years ago

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

paulfitz commented 8 years ago

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.

Sebastien-Meiffren commented 8 years ago

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)