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

Git diff History View not available on mobile #28

Open
Azmoinal opened this issue Mar 22, 2024 · 7 comments
Open

Git diff History View not available on mobile #28

Azmoinal opened this issue Mar 22, 2024 · 7 comments
Assignees

Comments

@Azmoinal
Copy link

"Show Git diff history view for active file" is not available on mobile (iOS and iPadOS) even if Git plugin is enabled and working properly.

Is it an expected behaviour?

@kometenstaub
Copy link
Owner

kometenstaub commented Mar 22, 2024

That is intentional: 5cfc98c

I believe the mobile version of the Git plugin didn’t exist back then. I don’t remember the exact reason though. I can make the command available on mobile.

@kometenstaub kometenstaub self-assigned this Mar 22, 2024
@Azmoinal
Copy link
Author

I could give a try to find if it could work together with Git mobile.

I know that mobile version of Obsidian Git plugin is not so good, so usually on mobile I relies on Working Copy app for the commit/push, so Git plugin was disabled. I reenabled it to try your plugin on my iPad after discovering that was so good on my MacBook.

In my mind, I was trying to identify the best way to take snapshots of my vault and to compare some updates on it and, since Git, allows me to push commits with specific messages, it seems the best way to do that.

In any case, thank you in advance for your great work.

@kometenstaub
Copy link
Owner

Please let me know if it works in the latest version.

@Azmoinal
Copy link
Author

Hi, the command is available but unfortunately the panel is completely empty without any information.
Do you know how I could extract debug logs from iOS/iPadOS? It seems that the shortcuts for macOS doesn’t work.

I could see the latest diff using “Git: Open diff view” so it seems that Git plugin is working.

@kometenstaub
Copy link
Owner

@Azmoinal
Copy link
Author

Probably I catch something using Macbook inspector on the connected iPhone: invoking the interface for version diff on Git it returns an error.

[Error] Unhandled Promise Rejection: TypeError: t.show is not a function. (In 't.show(this.versions[1].hash,this.file.path)', 't.show' is undefined)
	(funzione anonima) (plugin:obsidian-version-history-diff:452:11240)

It seems to be linked to the piece of code below.

 let r = await this.app.vault.read(this.file),
                s = await t.show(this.versions[1].hash, this.file.path);
            [this.leftContent, this.rightContent] = [s, r]
        }

I hope it helps.

@kometenstaub
Copy link
Owner

kometenstaub commented Mar 24, 2024

https://github.com/denolehov/obsidian-git?tab=readme-ov-file#mobile

The API might not be available on mobile. @Vinzent03 is that right? (I don’t expect you to fix anything, I’d just like to confirm that it won’t work on mobile.)

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

No branches or pull requests

2 participants