homebrew-core/Formula/git-absorb.rb
Phil Pirozhkov eaafa1e88e git-absorb 0.3.0 (new formula)
Closes #36707.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2019-02-07 12:52:40 +01:00

29 lines
795 B
Ruby

class GitAbsorb < Formula
desc "Automatic git commit --fixup"
homepage "https://github.com/tummychow/git-absorb"
url "https://github.com/tummychow/git-absorb/archive/0.3.0.tar.gz"
sha256 "94d540a7febd37cd74e95e7cab71ee3514df020989208ce3fe83560699072730"
depends_on "rust" => :build
def install
system "cargo", "install", "--root", prefix, "--path", "."
end
test do
(testpath/".gitconfig").write <<~EOS
[user]
name = Real Person
email = notacat@hotmail.cat
EOS
system "git", "init"
(testpath/"test").write "foo"
system "git", "add", "test"
system "git", "commit", "--message", "Initial commit"
(testpath/"test").delete
(testpath/"test").write "bar"
system "git", "add", "test"
system "git", "absorb"
end
end