Describe the bug
If you have git-extras installed that has a git-undo command, ugit can conflict with it.
E.g.: This is what I get when I try to install ugit when git-extras is already installed.
==> Pouring ugit--5.1.all.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/git-undo
Target /usr/local/bin/git-undo
is a symlink belonging to git-extras. You can unlink it:
brew unlink git-extras
To force the link and overwrite all conflicting files:
brew link --overwrite ugit
To list all files that would be deleted:
brew link --overwrite --dry-run ugit
Possible conflicting files are:
/usr/local/bin/git-undo -> /usr/local/Cellar/git-extras/6.4.0/bin/git-undo
==> Summary
🍺 /usr/local/Cellar/ugit/5.1: 6 files, 28.7KB
==> Running `brew cleanup ugit`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
To Reproduce
brew install git-extras
brew install ugit
Expected behavior
That's a great question and I'm not sure about it. I think there are a few options:
- Renaming the
git-undo symlink but I'm not sure I can think of an alternative name and this will break existing users who happily run git undo (I also like git undo)
- As far as I know Homebrew has some mechanism to deal with conflicting formulae but I'm not sure how it works
- Call this out in the readme and in the Homebrew description, the error above is not a fatal one, only the symlink is missing so
ugit works but git undo comes from git-extras. If the user decides they want git undo to execute ugit, they just need ask Homebrew to overwrite the link: brew link --overwrite ugit
Desktop (please complete the following information):
- OS:
macOS 12.4 (build: 21F79)
- Bash Version
zsh 5.8.1 (x86_64-apple-darwin21.0)
- FZF Version:
0.30.0 (brew)
- Git Version:
git version 2.36.1
- git-extras Version:
6.4.0
- Homebrew Version:
Homebrew 3.5.2
Homebrew/homebrew-core (git revision 3033e2a3b66; last commit 2022-06-18)
Homebrew/homebrew-cask (git revision e83c83c0a2; last commit 2022-06-18)
Additional context
The change was introduced with this issue: #15
Describe the bug
If you have
git-extrasinstalled that has agit-undocommand, ugit can conflict with it.E.g.: This is what I get when I try to install ugit when
git-extrasis already installed.To Reproduce
Expected behavior
That's a great question and I'm not sure about it. I think there are a few options:
git-undosymlink but I'm not sure I can think of an alternative name and this will break existing users who happily rungit undo(I also likegit undo)ugitworks butgit undocomes fromgit-extras. If the user decides they wantgit undoto executeugit, they just need ask Homebrew to overwrite the link:brew link --overwrite ugitDesktop (please complete the following information):
macOS 12.4 (build: 21F79)zsh 5.8.1 (x86_64-apple-darwin21.0)0.30.0 (brew)git version 2.36.16.4.0Homebrew 3.5.2Additional context
The change was introduced with this issue: #15