obsidian-git icon indicating copy to clipboard operation
obsidian-git copied to clipboard

[Bug]: Submodule functionality occasionally deletes contents of submodule

Open philskents opened this issue 3 years ago • 2 comments

Describe the bug

When using submodules obsidian-git occasionally commits the directory as empty, causing all of the contents to be deleted. Seems to be random but I will try to catch some logs.

Relevant errors (if available)

No response

Steps to reproduce

  • Configure submodule
  • Wait

Expected Behavior

No response

Addition context

No response

Operating system

macOS

philskents avatar Jan 24 '22 15:01 philskents

How can files get deleted if I commit a directory as empty? I don't really understand what you think is happening.

Vinzent03 avatar Jan 25 '22 15:01 Vinzent03

My apologies @Vinzent03, I did not explain that well, let me try again. So I have a private git repository that houses my notes. In addition I have a submodule in a public repo holding some notes on a specific topic. Every now and again, when obsidian-git backs up the parent repository, I get a commit on the submodule that looks like this. As you can see all of the files are deleted in this commit, even though I have not deleted them myself.

Does that help explain what it is I am seeing?

philskents avatar Jan 28 '22 01:01 philskents