git-flow-avh: fix fish completion#97637
Conversation
|
Has this been fixed upstream too? |
|
Thanks for taking a look! Looking at https://github.com/petervanderdoes/git-flow-completion/pulls, there are pull requests going back 6 years regarding similar issues (fish completion) that haven't been merged. I haven't opened a PR there. Would you recommend I do so? |
|
If you make a pull request we can just pull that one in as a patch. That seems like a fix that would benefit everyone |
|
Ah alright, I'll make one! |
|
Alright I've made this PR petervanderdoes/git-flow-completion#16. How would you recommend we "pull that one in as a patch"? I see we can update the homebrew-core/Formula/git-flow-avh.rb Line 32 in 4acce75 But how can we update homebrew-core/Formula/git-flow-avh.rb Line 11 in 4acce75 Should I make a release off my fork? |
|
you can use a |
5456e69 to
677a791
Compare
|
Thank you for your patience. I've added a reference patch in 677a791474dd615f8769a723ee72807ea9f38d61, but I still find it necessary to keep the fish_completion.install "git.fish" => "git-flow.fish"line. If I set it to just Seemingly not picking up the file renamed in the patch. Is this correct? Should I be patching differently? Any help is greatly appreciated! |
|
Trying 53e47eb which although doesn't work as desired on my machine, may work as intended, and may pass tests. |
|
So I've tried three variants of the patch:
Any recommendations on how to proceed? |
|
macOS Given that's the only thing the patch does, you might as well drop the patch and do |
|
Very well. I'm adding the diff here for posterity: diff --git a/Formula/git-flow-avh.rb b/Formula/git-flow-avh.rb
index 0add433876d..b129937d0cb 100644
--- a/Formula/git-flow-avh.rb
+++ b/Formula/git-flow-avh.rb
@@ -10,6 +10,13 @@ class GitFlowAvh < Formula
resource "completion" do
url "https://github.com/petervanderdoes/git-flow-completion/archive/0.6.0.tar.gz"
sha256 "b1b78b785aa2c06f81cc29fcf03a7dfc451ad482de67ca0d89cdb0f941f5594b"
+
+ # Remove once the following is merged:
+ # https://github.com/petervanderdoes/git-flow-completion/pull/16
+ patch do
+ url "https://github.com/petervanderdoes/git-flow-completion/commit/65d8580e48236ae8f086e078ed772c8891e41087.patch?full_index=1"
+ sha256 "6093489cdaa8b6c1ca396318319b47cc6b2420441c023d6588cecb1cd2299bbc"
+ end
end
end
@@ -48,7 +55,7 @@ class GitFlowAvh < Formula
resource("completion").stage do
bash_completion.install "git-flow-completion.bash"
zsh_completion.install "git-flow-completion.zsh"
- fish_completion.install "git.fish" => "git-flow.fish"
+ fish_completion.install "git-flow.fish"
end
endGoing to drop the commits that add the patch, and keep the rename. |
a3b92f4 to
bfe6cd2
Compare
The previous completion would override the default git completions, resulting in error messages like: Error: git completion not found which came from: https://github.com/petervanderdoes/git-flow-completion/blob/db3c032411c2d6fd897b2bfc52d15a6fc4e3bfa3/git.fish#L41 By renaming the included completions to git-flow.fish, we ensure that they are scoped to the correct formula.
bfe6cd2 to
189bbe6
Compare
|
Just rebased atop latest |
|
This is ready for a final review. Thank you all for your help in moving this forward. |
|
🤖 A scheduled task has triggered a merge. |
brew install --build-from-source <formula>, where<formula>is the name of the formula you're submitting?brew test <formula>, where<formula>is the name of the formula you're submitting?brew audit --strict <formula>(after doingbrew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?The previous completion would override the default
gitcompletion, resulting in error messages like:which came from: https://github.com/petervanderdoes/git-flow-completion/blob/db3c032411c2d6fd897b2bfc52d15a6fc4e3bfa3/git.fish#L41
By renaming the included completions to
git-flow.fish, we ensure that they are scoped to the correct formula.