Skip to content

Commit

Permalink
Merge pull request Homebrew#165917 from Homebrew/git-split-diffs
Browse files Browse the repository at this point in the history
git-split-diffs 1.1.0 (new formula)
  • Loading branch information
BrewTestBot authored Mar 14, 2024
2 parents aa9b567 + 474c7d4 commit 46e449f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ git-cola
git-credential-oauth
git-delta
git-lfs
git-split-diffs
git-town
git-xargs
gitbackup
Expand Down
38 changes: 38 additions & 0 deletions Formula/g/git-split-diffs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
require "language/node"

class GitSplitDiffs < Formula
desc "Syntax highlighted side-by-side diffs in your terminal"
homepage "https://github.com/banga/git-split-diffs"
url "https://registry.npmjs.org/git-split-diffs/-/git-split-diffs-1.1.0.tgz"
sha256 "124709db0b14ba1543553e8774d44c0c2361f4d4765f71df5d9d6d345cc104ed"
license "MIT"

bottle do
sha256 cellar: :any_skip_relocation, all: "5b348302822608e4fe122591d8b0d89cffa0a1687b79c6d49bab09fbbc9dc22b"
end

depends_on "node"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end

test do
system "git", "init", "--initial-branch=main"
system "git", "config", "user.name", "BrewTestBot"
system "git", "config", "user.email", "[email protected]"

(testpath/"test").write "foo"
system "git", "add", "test"
system "git", "commit", "-m", "Initial commit"
(testpath/"test").delete
(testpath/"test").write "bar"
system "git", "add", "test"
system "git", "commit", "-m", "Second commit"

system "git", "config", "--global", "core.pager", "git-split-diffs --color | less -RFX"

assert_match "bar", shell_output("git diff HEAD^1...HEAD")
end
end

0 comments on commit 46e449f

Please sign in to comment.