Skip to content

Commit 2b75a11

Browse files
GIT_CHECKOUT_SAFE_CREATE was removed.
1 parent 186f0ab commit 2b75a11

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ext/rugged/rugged_repo.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,10 +1866,10 @@ static void rugged_parse_checkout_options(git_checkout_options *opts, VALUE rb_o
18661866

18671867
if (rb_strategy == CSTR2SYM("safe")) {
18681868
opts->checkout_strategy |= GIT_CHECKOUT_SAFE;
1869-
} else if (rb_strategy == CSTR2SYM("safe_create")) {
1870-
opts->checkout_strategy |= GIT_CHECKOUT_SAFE_CREATE;
18711869
} else if (rb_strategy == CSTR2SYM("force")) {
18721870
opts->checkout_strategy |= GIT_CHECKOUT_FORCE;
1871+
} else if (rb_strategy == CSTR2SYM("recreate_missing")) {
1872+
opts->checkout_strategy |= GIT_CHECKOUT_RECREATE_MISSING;
18731873
} else if (rb_strategy == CSTR2SYM("allow_conflicts")) {
18741874
opts->checkout_strategy |= GIT_CHECKOUT_ALLOW_CONFLICTS;
18751875
} else if (rb_strategy == CSTR2SYM("remove_untracked")) {
@@ -1999,8 +1999,8 @@ static void rugged_parse_checkout_options(git_checkout_options *opts, VALUE rb_o
19991999
* :safe ::
20002000
* Allow safe updates that cannot overwrite uncommitted data.
20012001
*
2002-
* :safe_create ::
2003-
* Allow safe updates plus creation of missing files.
2002+
* :recreate_missing ::
2003+
* Allow checkout to recreate missing files.
20042004
*
20052005
* :force ::
20062006
* Allow all updates to force working directory to look like index.

test/repo_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,13 +863,13 @@ def test_checkout_tree_subtree_directory
863863

864864
def test_checkout_tree_raises_with_bare_repo
865865
assert_raises Rugged::RepositoryError do
866-
@bare.checkout_tree("HEAD", :strategy => :safe_create)
866+
@bare.checkout_tree("HEAD", :strategy => :safe)
867867
end
868868
end
869869

870870
def test_checkout_tree_works_with_bare_repo_and_target_directory
871871
Dir.mktmpdir("alternative") do |dir|
872-
@bare.checkout_tree("HEAD", :strategy => :safe_create, :target_directory => dir)
872+
@bare.checkout_tree("HEAD", :strategy => [:safe, :recreate_missing], :target_directory => dir)
873873

874874
assert File.exist?(File.join(dir, "README"))
875875
assert File.exist?(File.join(dir, "new.txt"))

0 commit comments

Comments
 (0)