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: previewer and action/picker #19

Open
chuan2984 opened this issue Jul 13, 2024 · 1 comment
Open

bug: previewer and action/picker #19

chuan2984 opened this issue Jul 13, 2024 · 1 comment

Comments

@chuan2984
Copy link

chuan2984 commented Jul 13, 2024

Hi there,
I just started using the plugin, really like it. And i use the branch diff a lot. And I have the following question and bugs.

Bug:

  1. when not on the git root, branch_diff would error saying files is not found. I was able to solve this modifying the branch_diff function to use an absolute path as opposed to relative path, since it seems like the relative path would just be appended to the cwd
  2. After fixing the above, i ran into the problem of seeing the correct display of file path(relative to git root) in the picker but not opening correctly. Im currently working to resolve this one, it seems like the list that is returned contains only the relative path, and without an override of the action function, it just tries to open using a relative path to the git root. Im playing around with the actions to try to find a solution here. Im wondering if action should always try to open a file using the aboslute path(im new to this)?

Question:

  1. Why is there an if branch thats checking if there are unstaged changes in branch_diff? It seems to just display the current file if thats the case, wouldnt you want either a diff view of unstaged + staged against target or just a staged version against target?

Lastly, thanks for providing us this great plugin, i would happy to turn my current solutions into PRs.

Edit: I took a stab at it and created my own fork with the aforementioned issues fixed. happy to create PRs if they align with your design decisions.

@chuan2984 chuan2984 changed the title question: previewer bug: previewer Jul 14, 2024
@chuan2984 chuan2984 changed the title bug: previewer bug: previewer and action/picker Jul 14, 2024
@axkirillov
Copy link
Owner

Hi. I am happy to accept your prs. As long as it does not break the existing behaviour for other users. I think your suggestions sound reasonable.
To be honest I don't remember why unstaged files don't show diff. It might had to do with removed files being showed incorrectly or something like that. I'm OK with changing that behaviour though.

It's important to mention though, I don't use this plugin anymore. So I would kindly ask you to support any changes that get merged through your prs :)

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