From a62b6dd226402219b1df6c7ff54bbde9f82d718a Mon Sep 17 00:00:00 2001 From: Eric Mueller Date: Mon, 7 Jul 2025 22:12:18 -0400 Subject: [PATCH 1/2] chore: update comment to be accurate (bin/test prepends the unit_test directory; the quoted calls previously would fail because it ended up trying to run `tests/units/test/units/test_archive.rb`) --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 3c40c500..7af234d5 100644 --- a/Rakefile +++ b/Rakefile @@ -14,9 +14,9 @@ task :test do # You can run individual test files (or multiple files) from the command # line with: # - # $ bin/test tests/units/test_archive.rb + # $ bin/test test_archive.rb # - # $ bin/test tests/units/test_archive.rb tests/units/test_object.rb + # $ bin/test test_archive.rb test_object.rb end default_tasks << :test From 2aae0d4199abc1aa20b0c3472989f7f806552e35 Mon Sep 17 00:00:00 2001 From: Eric Mueller Date: Mon, 7 Jul 2025 22:20:39 -0400 Subject: [PATCH 2/2] fix: call Git::Index#new correctly from initialize_components Use the keyword parameter, not the positional one. --- lib/git/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git/base.rb b/lib/git/base.rb index 7ffb1d2e..b291c83f 100644 --- a/lib/git/base.rb +++ b/lib/git/base.rb @@ -851,7 +851,7 @@ def setup_logger(log_option) def initialize_components(options) @working_directory = Git::WorkingDirectory.new(options[:working_directory]) if options[:working_directory] @repository = Git::Repository.new(options[:repository]) if options[:repository] - @index = Git::Index.new(options[:index], false) if options[:index] + @index = Git::Index.new(options[:index], must_exist: false) if options[:index] end # Normalize options before they are sent to Git::Base.new