gitoxide icon indicating copy to clipboard operation
gitoxide copied to clipboard

`gix tool organize` appends ".git" to repositories

Open spencergilbert opened this issue 3 years ago • 2 comments

gix tools organize
 20:43:04 organize WOULD move ./github.com/Byron/gitoxide to /Users/sgilbert/Code/github.com/Byron/gitoxide.git

Is this intentional behavior?

spencergilbert avatar Aug 01 '21 00:08 spencergilbert

Thanks for letting me know. I think I knew about this but left it in because it wasn't a problem for me yet as I always clone from the browser URL. The tool doesn't alter the remote URL at all and many clones typically have remote URLs with .git suffix - a path from which the on-disk location is derived as is.

Hence, this behaviour is known and intentional, but I wouldn't call it desirable.

If I recall correctly, simply stripping .git from the remote URL also wouldn't be correct as some clones may be bare, which is when the .git suffix should remain. Once I tried to fix it but ran into unanticipated problems that would have cost more time than I was willing to invest.

Let's leave this issue open and I will try again one day, contributions are also welcome of course.

Byron avatar Aug 01 '21 12:08 Byron

I'll definitely see if I can find the time to take a look at contributing a fix - it's definitely an interesting project, and a more friendly git UX is always nice 😄

spencergilbert avatar Aug 02 '21 00:08 spencergilbert