Skip to content
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

[Bug]: Line author fails when the vault is a subdir of the git repo #660

Open
ptxmac opened this issue Dec 21, 2023 · 1 comment · May be fixed by #722
Open

[Bug]: Line author fails when the vault is a subdir of the git repo #660

ptxmac opened this issue Dec 21, 2023 · 1 comment · May be fixed by #722

Comments

@ptxmac
Copy link

ptxmac commented Dec 21, 2023

Describe the bug

For vaults that are not the root of a git repository the "line author" feature doesn't work

Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)

obsidian-git. hash-object failed: fatal: could not open 'Readme.md' for reading: No such file or directory
eval @ plugin:obsidian-git:29800

plugin:obsidian-git:29119 Uncaught (in promise) Error: fatal: could not open 'Readme.md' for reading: No such file or directory

    at Object.action (plugin:obsidian-git:29119:25)
    at PluginStore.exec (plugin:obsidian-git:29144:25)
    at eval (plugin:obsidian-git:26649:43)
    at new Promise (<anonymous>)
    at GitExecutorChain.handleTaskData (plugin:obsidian-git:26647:16)
    at GitExecutorChain.eval (plugin:obsidian-git:26631:44)
    at Generator.next (<anonymous>)
    at fulfilled (plugin:obsidian-git:25476:24)

Steps to reproduce

  • Create a new git repo bob
  • Create a new vault as a subdir in the repo bob/vault
  • Add some notes, commit, and turn on "line author"

Expected Behavior

The rest of obsidian git works fine for vaults that are not the root of a repository, so I would expect this feature to also work.

Addition context

No response

Operating system

macOS

Installation Method

None

Plugin version

2.22.0

@micimize
Copy link

micimize commented Mar 4, 2024

Same issue on linux. Tried a few workarounds like GIT_PREFIX=notes/ or custom path = ../ or notes none of which worked (the latter logged partially sliced filenames in the terminal which was odd)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants