sourcegit-scm / sourcegit

Windows/macOS/Linux GUI client for GIT users
MIT License
668 stars 69 forks source link

supported accept repository path from cli #134

Closed seayxu closed 2 months ago

seayxu commented 2 months ago

supported accept repository path from cli

sourcegit.exe D:\code\tmp\sourcegit
love-linger commented 2 months ago
  1. If you start this app without custom commandline args, it will crash.

image

  1. If you have enable Restore windows and the last time you shutdown this app with opened repository tabs, there will be no Welcome page opened on startup.

image

And after started, if you open a new tab, it will just replaced to the repository that specified by the commandline. It's very strange.

love-linger commented 2 months ago

And it's not recommanded to do this in Views. Instead, it should be implemented in ViewModels.

seayxu commented 2 months ago

Fixed crash without path, to implement this in View is fast.

love-linger commented 2 months ago

I've pushed my implementation for this feature.

The disadvantage of implementing in Views.Welcome is that it will not work until you have a welcome page.

love-linger commented 2 months ago

For example, this is the behavior with your PR:

https://github.com/sourcegit-scm/sourcegit/assets/4075673/f991af5f-08f8-4d24-ac2f-0b8aa2c28b70