-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: custom git repository root #209
Conversation
* origin/basePath: chore(release): 1.24.0 feat: add show, diff, log as api chore(release): 1.23.0 feat: reworked diff view handling fix: refresh source control view on exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. I left you some comments.
Great feedback. I updated the setting to add more clarity and to use relative paths. I did use an absolute path during development. I agree that it makes more sense for it to be a relative path. |
When testing locally, I noticed that you forgot to add |
Awesome, thanks for your help. I didn't see anything in the analyzer, I may have missed it though. Also nice catch on the separator. Haven't written anything cross platform before and didn't think about the separator. Let me know if you need anything else to merge, I'm not able to because I don't have write access. |
Context
For my use case, I wanted to have a public blog live within my obsidian vault. This blog is hosted and built on github pages and is a normal git repository. To keep things separated, the git repository be in a subfolder not at the root of the vault. This is unsupported currently and referenced in a few issues:
Solution
A setting was added called bath path that allows users to set a custom git root. This is then used by
simple-git
when configuring the SimpleGit RepoManger.Limitations
A user is only allowed on repo in the entire vault. I evaluated having multiple git repo support but it turned out to be a larger refactor than I had time for. For my use case this is totally fine.
Thanks for the great plugin!