ghq icon indicating copy to clipboard operation
ghq copied to clipboard

`ghq list` is slow when a root directory contains directories which are not managed by any VCS.

Open shotat opened this issue 3 years ago • 3 comments

ghq list is slow when a root directory contains directories which are not managed by any VCS.

It seems that ghq list walks directory until it find a VCS configuration like .git directory. It would be helpful if ghq could give some kind of warning when it hits directories which are not managed by VCSs.

Versions

ghq -v
ghq version 1.2.1 (rev:dd139fb)

shotat avatar May 31 '21 08:05 shotat

Maybe a setting to ignore all directories without a specific VCS subdir like .git would be nice

yhkaplan avatar Oct 18 '21 03:10 yhkaplan

Quick alternative: find $(ghq root) -maxdepth 4 -type d -name .git -printf '%P\n' | xargs -n1 dirname

(Change 4 to your suitable value)

acomagu avatar Apr 17 '22 04:04 acomagu

Quick alternative: find $(ghq root) -maxdepth 4 -type d -name .git -printf '%P\n' | xargs -n1 dirname

Saved my day!

craftzdog avatar Jun 23 '22 01:06 craftzdog