sahib / brig

File synchronization on top of ipfs with git like interface & web based UI
https://brig.readthedocs.io
GNU Affero General Public License v3.0
568 stars 33 forks source link

`brig diff` does not always show a file as missing in both directions #10

Closed sahib closed 6 years ago

sahib commented 6 years ago

Test setup

Expectation: Laptop diff should report HELLODESK as missing.

Desktop

➜  ~  mkdir BrigDesk && b init desk@brand/home
[...]
➜  ~  b mount Brig
➜  ~  ll Brig
total 512
-rwxr-xr-x 1 seb seb 443 Apr  8 16:30 README.md
➜  ~  b whoami
- Name: desk@brand/home
  Fingerprint: QmSBfBvU2VDiYvcvUCfWP3rvdgMwoeFH38wV5ZMfNoV3Xe:SEfXUEMYjGHaZBNTt1AbKw8GywoHdYbwXYB2vugmu9QzobTUVj6hHqkYWdyHXqRKkowPSQvudC4NWFg6AjW2WA91T2JSY
➜  ~  b remote add lap QmakY86yWQovFdCzLxFiKRXgX2YPonCU8rFuLJofvsyYje:SEfXUB8sozJAumZZKKN99zWgEvLuPPtYvt3k3EnUJHrHfh1zSwCkT9NcAs4TxY1Vxf7McXdPiJ6KaHXZgzdfhPARkYeNP
➜  ~  b remote list
NAME  FINGERPRINT  ROUNDTRIP  LASTSEEN
lap   QmakY86yW    1ms        ✔ Apr  8 16:33:22
➜  ~  b diff lap
•
├── + HELLODESK
└── README.md ⚡ README.md

0 directories, 2 files
➜  ~

Laptop

➜  ~ mkdir BrigLap && b init lap@brand/home
[..]
➜  ~ b mount Brig
➜  ~ ll Brig
total 512
-rwxr-xr-x 1 seb seb 443 Apr  8 16:31 README.md
➜  ~ b whoami
- Name: lap@brand/home
  Fingerprint: QmakY86yWQovFdCzLxFiKRXgX2YPonCU8rFuLJofvsyYje:SEfXUB8sozJAumZZKKN99zWgEvLuPPtYvt3k3EnUJHrHfh1zSwCkT9NcAs4TxY1Vxf7McXdPiJ6KaHXZgzdfhPARkYeNP
➜  ~ b remote add desk QmSBfBvU2VDiYvcvUCfWP3rvdgMwoeFH38wV5ZMfNoV3Xe:SEfXUEMYjGHaZBNTt1AbKw8GywoHdYbwXYB2vugmu9QzobTUVj6hHqkYWdyHXqRKkowPSQvudC4NWFg6AjW2WA91T2JSY
➜  ~ b remote list
NAME  FINGERPRINT  ROUNDTRIP  LASTSEEN
desk  QmSBfBvU2    0s         ✔ Apr  8 16:33:23
➜  ~ touch Brig/HELLODESK
➜  ~ b diff desk
•
└── README.md ⚡ README.md

0 directories, 1 file
sahib commented 6 years ago

This was simply a misconfiguration in the command line client. It compared the own HEAD against the remote CURR. Fixed as of 8b67f62a to always use CURR when dealing with remotes.