mixu / gr

Multiple git repository management tool
http://mixu.net/gr/
676 stars 104 forks source link

"gr status" raises error "./ Missing .git directory." #56

Open torfsen opened 8 years ago

torfsen commented 8 years ago

I've just installed gr and initialized my list of repositories via

gr tag discover .

When the editor opened I quit without adding any tags (I currently don't need any since I always want to target all repos at the moment). gr then told me that I could use gr status, however:

$ gr tag discover .
[gr] 421/421 Scanning venv/local/lib/python2.7/* for .git directories (depth 5)
Tags updated. Run `gr status` or `gr tag list` to see the current state.
$ gr status
./ Missing .git directory

If I pass a path then it works:

gr repo1 status
/path/to/repo1  1 modified 

This is on 0.5.1.

lecstor commented 7 years ago

I just had the same. I suspect it's an issue with console opening an external editor or similar as gr exits before the file is saved and does nothing with it.

~/.grconfig.json is empty.

If you edit that file to look like the example in the README then things start working as advertised. *absolute file paths are required

{
 "tags": {
  "books": [
    "/home/m/mnt/css-book"
  ]
}
vixus0 commented 7 years ago

I'm seeing the same issue in version 0.5.0 (Homebrew/OSX).

Looks like it's caused by gr discover . only saving the relative paths in ~/.grconfig.json which means later gr @mytag status only works from within the directory you initially executed gr discover . in.