chshersh / zbg

✨ Zero Bullshit Git
Mozilla Public License 2.0
183 stars 11 forks source link

status can't print diff when different path than root #18

Closed davesnx closed 1 year ago

davesnx commented 1 year ago

Hi @chshersh, really good tool. Thanks for the effort and style on zbg.

I'm using it and found a bug when running status from a different path than root (containing the .git folder)

→ $ zbg status
 modified  .gitignore                         |   1 ■
 modified  dune                               |   2 ■■
 modified  dune-project                       |   2 ■■
 modified  e2e/rescript-v9-JSX3/bsconfig.json |   3 ■■■
 modified  e2e/rescript-v9-JSX3/package.json  |   3 ■■■
 modified  e2e/rescript-v9-JSX3/yarn.lock     | Bin 87888 -> 64994 bytes
 added     packages/css/bsconfig.json         |   8 ■■■■■■■■

→ $ cd bin

→ $ zbg status
 modified  .gitignore                         | 0 <unable to match file>
 modified  dune                               | 0 <unable to match file>
 modified  dune-project                       | 0 <unable to match file>
 modified  e2e/rescript-v9-JSX3/bsconfig.json | 0 <unable to match file>
 modified  e2e/rescript-v9-JSX3/package.json  | 0 <unable to match file>
 modified  e2e/rescript-v9-JSX3/yarn.lock     | 0 <unable to match file>
chshersh commented 1 year ago

Hi @davesnx 👋🏻

Thanks for the bug report!

This is an expected problem, I have to look into the fix 👀 Indeed, would be nice to fix it!

chshersh commented 1 year ago

Fixed by:

chshersh commented 1 year ago

@davesnx This problem was kindly fixed by @tekknoid 💝

I would appreciate it if you could have a chance to test the change by building from the latest main. Thanks! 🙏🏻

davesnx commented 1 year ago

It's solved, Thanks!