Add the option to modify the repo root relative path #73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the option to set a relative path from the graph's path to consider the git repo root.
For use cases like mine, where I have several graphs under one central repo, that also contains the logseq configuration and some scripts to initialise a new device to use it with the same plugins, settings and such shared between the graphs.
So basically it currently just appends the input of the new setting to the
currentGitFolder
constant defined in the git helper function execGitCommand scope.Seems to work for me, but this might have problems on other platforms. I'm on latest macos, so at least that works.
Initially I though I'd use the common utility libs (in this case,
path
) I thought I remembered, from some earlier web work years ago, were easily available to node context, but I couldn't quickly figure out what extra steps that requires here. I'm not so familiar with the current web frameworks, so I couldn't be bothered to mess with it, and this happens to work for my devices as-is.I thought I'd send the PR either way, just in case logseq handles the path normalisation under the hood, since I'm not aware how the
execGit
orlogseq.Git
things work internally. Shouldn't take much to just adapt this quick addition, but maybe it's not worth the hassle if it takes more. So please do ignore this in that case, and close the PR.Unfortunately I had some internal linter running through the code I now see from the diffs. If this seems worth a merge, I can clean up those changes, just ping me.