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

diff View #158

Closed
Tracked by #160
BaumiCoder opened this issue Dec 24, 2021 · 9 comments
Closed
Tracked by #160

diff View #158

BaumiCoder opened this issue Dec 24, 2021 · 9 comments
Labels
enhancement New feature or request

Comments

@BaumiCoder
Copy link

Use-Case

When I see a changed file in the Source Control, I want to check what have changed there. Maybe there are changes in it, which shouldn't be commited to the repository. This can be an undesigned change in a file for example.

Specifications for feature

A possibility for viewing the diff of a file could be look like this:

  1. A option in the settings for choosing the diff viewer application.
  2. calling the function
    2.1. Source Control: Double click on a file OR a another Icon on each file
    2.2. Obsidian Command: A command to get the diff of the currently open (and active) file in obsidian
@Vinzent03 Vinzent03 added the enhancement New feature or request label Dec 24, 2021
@BaumiCoder
Copy link
Author

Thank you for the fast implementation!

It works fine for markup files, but with files of other kinds it seems to be broken. Another filetype for example is the workspace file of obsidian. A double click on it in the Source Control shows me this message in the Diff View ".obsidian/workspace was deleted".

@Vinzent03
Copy link
Owner

The error message could be better. The diff view only shows diff of other opened files, but Obsidian doesn't support opening files in . directories like .obsidian. Will think about a solution.

@dailyherold
Copy link

dailyherold commented Jan 21, 2022

Noticed something interesting with my v0.13.19 appimage build:

  • Double click on a modified markdown file to view diff
  • The diff pane opens but I get the path/to/file was deleted error
  • Close Obsidian without changing workspace
  • Reopen and I see the proper diff rendered in pane that previously showed the error

The file I'm using in the example is a normal markdown in a non-hidden directory, part of my main vault. Happy to provide more details if needed. Thanks for the work on this plugin, it's fantastic!

@Vinzent03
Copy link
Owner

@dailyherold sorry, but I can't reproduce. The xx was deleted is shown when the file doesn't exist in the Obsidian vault. How is your path exactly formatted and what OS are you using?

@dailyherold
Copy link

dailyherold commented Jan 28, 2022

How is your path exactly formatted

@Vinzent03 Are you referring to a particular setting? Or just my vault location itself? Vault is nested in my git repo's root, but .obsidian in the top/root of my vault path, same level as some organizational directories I use (fleeting/literature/permanent/templates). What's weird is all other functionality seems to work, haven't hit another git operation from quick command or UI button that goes unexpectedly. Just diffing.

OS is PopOS/Ubuntu 20.04.

@generic-user
Copy link

generic-user commented Feb 9, 2022

I seem to have the same problem, could it be the . in the foldername?
image

OS: Windows 10
The base path to my vault also has a . in its name, so I have it with all my files.
Ea: C:\Users\generic\Documents\obsidion\my.vault

@Vinzent03
Copy link
Owner

Vinzent03 commented Mar 23, 2022

@generic-user @dailyherold Does the issue still persist. I released a new version with a different diff view system. It may have fixed this issue too.

@generic-user
Copy link

generic-user commented Mar 23, 2022

@generic-user @dailyherold Does the issue still persist. I released a new version with a different diff view system. It may have fixed this issue too.

Just tested it, and at first glance the issue is fixed for me, thanks @Vinzent03. 🎉

@dailyherold
Copy link

Never circled back, but problem resolved for me, thanks!

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

No branches or pull requests

4 participants