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 add -p for submodule doesn't work since v0.9.0 #755

Closed
kg8m opened this issue Oct 29, 2021 · 5 comments · Fixed by #756
Closed

🐛 git add -p for submodule doesn't work since v0.9.0 #755

kg8m opened this issue Oct 29, 2021 · 5 comments · Fixed by #756

Comments

@kg8m
Copy link
Sponsor

kg8m commented Oct 29, 2021

Hi. Thanks for developing delta. It makes my Git life very comfortable.

I have an issue that git add -p for submodule doesn't work. When I execute git add -p for submodule, Git shows a fatal error as following:

fatal: mismatched output from interactive.diffFilter
hint: Your filter must maintain a one-to-one correspondence
hint: between its input and output lines.

delta v0.8.3 is OK but v0.9.0 and v0.9.1 are not OK.

git add -p with delta v0.8.3 shows:

diff --git a/foo b/foo
index abc1234..xyz6789 000000
--- a/foo
+++ b/foo
@@ -1 +1 @@
 1  ⋮    │-Subproject commit abc1234abc1234abc1234abc1234abc1234abc12
    ⋮ 1  │+Subproject commit xyz6789xyz6789xyz6789xyz6789xyz6789xyz67

On the other hand, git add -p with delta v0.9.1 shows:

diff --git a/foo b/foo
index abc1234..xyz6789 000000
--- a/foo
+++ b/foo
abc1234..xyz6789

I guess this difference of output causes this issue.

My .gitconfig is:

[delta]
	line-numbers = true
	...

[interactive]
	diffFilter = delta --color-only

Excuse me if my usage/configuration is bad. Could you please point out my bad usage/configuration if so?

Best regards.

@dandavison
Copy link
Owner

dandavison commented Oct 29, 2021

Thanks a lot for this @kg8m. There's nothing wrong with your configuration -- as you suggest, this is a regression introduced at 0.9.0. I've opened a PR #756 and will merge it to master shortly. If you'd like to test out that branch, that would be great (instructions for building delta are in the README but it's standard for Rust). Assuming it seems to be a fix, I'll try to release it soon, and will ping this ticket when it's released.

@kg8m
Copy link
Sponsor Author

kg8m commented Oct 29, 2021

Thank you so much for really quick fix and response. I tested the branch dont-reformat-submodule-diff-under-git-add-p and confirmed the issue was resolved🎉 I appreciate your great work!!

@hahuang65
Copy link

Very cool! Not trying to rush in anyway, just curious about how long it usually takes these changes to make it to package managers like AUR and Homebrew?

@dandavison
Copy link
Owner

dandavison commented Oct 29, 2021

I've just pushed the tag and triggered the release. That automatically opens a PR against Homebrew: Homebrew/homebrew-core#88277 When that merges, the new version will be available in Homebrew. I'm less clear about the mechanics of the various linux package repositories (are they polling github for version changes?). cc @Kr1ss-XD

The new binaries are here: https://github.com/dandavison/delta/releases/tag/0.9.2

@Kr1ss-XD
Copy link
Contributor

Basically, the individual maintainers are responsible to keep track of updates for their packages; at least that is how it's handled in Arch - not sure about other distros.

Users can flag packages as "out of date", to make the maintainer(s) aware. I see that the delta package is already flagged.

Most package maintainers do use tools for version tracking, that's not standardized though.

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.

4 participants